Since I have different networks behind my openvpn-gateway, checking “Use
this connection only for resources on its network.” did not help me (but
I keept it checked). Maybe someone could just add an input-field to
specify additional routes (like in an up-script)?
Then I found raliegh´ s tip in post #27. I just simplified it by editing
/etc/NetworkManager/dispatcher.d/01ifupdown like:
Add the lines from "#vpn fix" to "#end fix" after the line "case "$2"
in" as shown:
case "$2" in
#vpn fix
vpn-up)
#lets stick in a new host route to keep the VPN working
/sbin/route add -net 192.168.0.0 netmask 255.255.0.0 gw <my
ppp-endpoint>
exit 0
;;
vpn-down)
#lets remote the unneeded route now that the vpn is down
/sbin/route del -net 192.168.0.0
exit 0
;;
#end fix
up)
export MODE="start"
export PHASE="up"
...
...
Now everything works fine. My route is set up and deleted automatically
as desired when I bring up and close the vpn-connection.
Thanks a lot raliegh!
Karl
--
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/330833
Title:
NetworkManager always overwrites default route when connecting to
OpenVPN network
--
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs