Can you elaborate on what you define "correctly" as?
I have set it up with a static ip, a netmask and the correct gateway. OpenVPN removes that gateway as it supposed to, but does not add it back correctly by not adding the -p switch
OpenVPN dosen't put back def.gateway
Moderators: TinCanTech, TinCanTech, TinCanTech, TinCanTech, TinCanTech, TinCanTech
-
- OpenVpn Newbie
- Posts: 13
- Joined: Tue Mar 24, 2015 2:53 pm
- Traffic
- OpenVPN Protagonist
- Posts: 4066
- Joined: Sat Aug 09, 2014 11:24 am
Re: OpenVPN dosen't put back def.gateway
Configure windows with a default gatewayslupper wrote:its only when i restart the PC that it its not working and THEN i have to add the default gateway to tcp/ip
Last edited by Traffic on Tue Mar 31, 2015 10:19 pm, edited 1 time in total.
-
- OpenVpn Newbie
- Posts: 13
- Joined: Tue Mar 24, 2015 2:53 pm
Re: OpenVPN dosen't put back def.gateway
Its already configured with the correct def. gateway. I though I'd already written that a few times.
if you want specifics:
Computer: 10.0.0.5 mask 255.255.255.0 default gateway 10.0.0.1
Router: 10.0.0.1 255.255.255.0
Totally vanilla, plain simple config
if you want specifics:
Computer: 10.0.0.5 mask 255.255.255.0 default gateway 10.0.0.1
Router: 10.0.0.1 255.255.255.0
Totally vanilla, plain simple config
-
- OpenVpn Newbie
- Posts: 13
- Joined: Tue Mar 24, 2015 2:53 pm
Re: OpenVPN dosen't put back def.gateway
... then i start openvpn and connect. If i then go to my TCP/IP settings, the default gateway has been removed (i assume as intended).
Then disconnect OpenVPN and it adds a route 0.0.0.0 0.0.0.0 10.0.0.1 which is correct.
After i restart windows that route has been flushen, and im left with no default gateway untill i add i manually.
I assume thats not working as intended.
- as i wrote earlier, it seems to me that OpenVPN need to close with:
route.exe ADD -p 0.0.0.0 MASK 0.0.0.0 10.0.0.1 and not route.exe ADD 0.0.0.0 MASK 0.0.0.0 10.0.0. as its doing now
Then disconnect OpenVPN and it adds a route 0.0.0.0 0.0.0.0 10.0.0.1 which is correct.
After i restart windows that route has been flushen, and im left with no default gateway untill i add i manually.
I assume thats not working as intended.
- as i wrote earlier, it seems to me that OpenVPN need to close with:
route.exe ADD -p 0.0.0.0 MASK 0.0.0.0 10.0.0.1 and not route.exe ADD 0.0.0.0 MASK 0.0.0.0 10.0.0. as its doing now
-
- OpenVpn Newbie
- Posts: 13
- Joined: Tue Mar 24, 2015 2:53 pm
Re: OpenVPN dosen't put back def.gateway
I just did some testing.
route.exe ADD 0.0.0.0 MASK 0.0.0.0 10.0.0.1 will add the default route temporary while route.exe ADD -p 0.0.0.0 MASK 0.0.0.0 10.0.0.1 will add it permanently, so i assume it must be a bug in openVPN
route.exe ADD 0.0.0.0 MASK 0.0.0.0 10.0.0.1 will add the default route temporary while route.exe ADD -p 0.0.0.0 MASK 0.0.0.0 10.0.0.1 will add it permanently, so i assume it must be a bug in openVPN
- Traffic
- OpenVPN Protagonist
- Posts: 4066
- Joined: Sat Aug 09, 2014 11:24 am
Re: OpenVPN dosen't put back def.gateway
so report it ..slupper wrote:so i assume it must be a bug in openVPN
Regedit:
- HKEY_LOCAL_MACHINE\SYSTEM\ControlSet\Services\{your interface}\Parameters\Tcpip=DefaultGateway:?
- Reboot pc
Code: Select all
ipconfig /all > defgw.txt route print >> defgw.txt
- Connect to VPN
Code: Select all
ipconfig /all >> defgw.txt route print >> defgw.txt
- Disconnect from VPN
Code: Select all
ipconfig /all >> defgw.txt route print >> defgw.txt
- post: defgw.txt
- Reboot pc