Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
OpenVPN: Gateway is not restored after stopping VPN
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
B.marc
n00b
n00b


Joined: 16 Oct 2005
Posts: 40
Location: Braunschweig / Germany

PostPosted: Sat Jan 21, 2006 6:00 pm    Post subject: OpenVPN: Gateway is not restored after stopping VPN Reply with quote

Hi,

I have openvpn (routed setup, not bridgeing) running at my work. When I connect at home to the VPN, it is working flawless, but when I disconnect the VPN, my default gateway is not restored.

Here is the ouput:
1.) before I connect to VPN
Code:
hive marc # route -n
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
192.168.0.0     0.0.0.0         255.255.255.0   U     0      0        0 eth0
127.0.0.0       127.0.0.1       255.0.0.0       UG    0      0        0 lo
0.0.0.0         192.168.0.1     0.0.0.0         UG    0      0        0 eth0


2.) VPN is running:
Code:
hive marc # route -n
Kernel IP routing table
Destination                Gateway         Genmask         Flags Metric Ref    Use Iface
[IP of firewall]           192.168.0.1     255.255.255.255 UGH   0      0        0 eth0
10.8.0.10                  0.0.0.0         255.255.255.255 UH    0      0        0 tun0
[subnet 1 behind firewall] 10.8.0.10       255.255.255.128 UG    0      0        0 tun0
10.8.0.0                   10.8.0.10       255.255.255.0   UG    0      0        0 tun0
192.168.0.0                0.0.0.0         255.255.255.0   U     0      0        0 eth0
[subnet 2 behind firewall] 10.8.0.10       255.255.255.0   UG    0      0        0 tun0
127.0.0.0                  127.0.0.1       255.0.0.0       UG    0      0        0 lo
0.0.0.0                    10.8.0.10       0.0.0.0         UG    0      0        0 tun0


3.) VPN is stopped:
Code:
hive marc # route -n
Kernel IP routing table
Destination      Gateway         Genmask         Flags Metric Ref    Use Iface
[IP of firewall] 192.168.0.1     255.255.255.255 UGH   0      0        0 eth0
192.168.0.0      0.0.0.0         255.255.255.0   U     0      0        0 eth0
127.0.0.0        127.0.0.1       255.0.0.0       UG    0      0        0 lo


If you compare 1.) and 3.), you can see, that my old gateway is not restored. Does anyone know, why this is happening and how I can resolve this problem?

Thanks in advance
Marc
Back to top
View user's profile Send private message
B.marc
n00b
n00b


Joined: 16 Oct 2005
Posts: 40
Location: Braunschweig / Germany

PostPosted: Fri Mar 24, 2006 7:31 pm    Post subject: Reply with quote

If of any interest, the problem was, that I downgraded the user privileges to nobody:nogroup after successfull initialisation (option user and group). When I stop openvpn, the proces does not have root rights anymore, therefore it cannot change the routes back.

Marc
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum