Connection works with plain openvpn, fails with networkmanager



Hoi everyone,

I have an old openvpn script that I'm trying to convert to a
NetworkManager configuration on Ubuntu Intrepid. I've got it mostly
working, and I've verified that nm passes the same parameters to
openvpn as my (working) script does (besides  --resolv-retry infinite
and --ns-cert-type server, which shouldn't affect this). Apparently NM
is doing something extra that's breaking things, but I haven't been
able to find a useable solution.

After some looking in the logs and routing table and some playing
around I found that I can make the connection started by
networkmanager work by executing this command:

route del -host vpn.company.nl dev tap0

Where vpn.company.nl is the vpn server I'm connecting to. I'm not
really sure why that route was added in the first place, since to me
it seems like it would try to route the vpn connection over the vpn.

The interesting part of my syslog looks like this (public ip addresses
anonymised):

Dec 18 13:10:57 mypc NetworkManager: <info>  VPN connection 'Company'
(IP Config Get) reply received.
Dec 18 13:10:57 mypc NetworkManager: <info>  VPN Gateway: XX.XX.64.74
Dec 18 13:10:57 mypc NetworkManager: <info>  Internal Gateway: 192.168.168.1
Dec 18 13:10:57 mypc NetworkManager: <info>  Tunnel Device: tap0
Dec 18 13:10:57 mypc NetworkManager: <info>  Internal IP4 Address:
192.168.170.229
Dec 18 13:10:57 mypc NetworkManager: <info>  Internal IP4 Prefix: 32
Dec 18 13:10:57 mypc NetworkManager: <info>  Internal IP4
Point-to-Point Address: 0.0.0.0
Dec 18 13:10:57 mypc NetworkManager: <info>  Maximum Segment Size (MSS): 0
Dec 18 13:10:57 mypc NetworkManager: <info>  Static Route:
XX.XX.64.74/32   Next Hop: XX.XX.64.74
Dec 18 13:10:57 mypc NetworkManager: <info>  Static Route:
XX.XX.64.64/27   Next Hop: XX.XX.64.64
Dec 18 13:10:57 mypc NetworkManager: <info>  Static Route:
YY.YY.228.0/22   Next Hop: YY.YY.228.0
Dec 18 13:10:57 mypc NetworkManager: <info>  Static Route:
YY.ZZ.255.11/32   Next Hop: YY.ZZ.255.11
Dec 18 13:10:57 mypc NetworkManager: <info>  Internal IP4 DNS: YY.ZZ.231.73
Dec 18 13:10:57 mypc NetworkManager: <info>  DNS Domain: '(none)'
Dec 18 13:10:57 mypc NetworkManager: <info>  Login Banner:
Dec 18 13:10:57 mypc NetworkManager: <info>
-----------------------------------------
Dec 18 13:10:57 mypc NetworkManager: <info>  (null)
Dec 18 13:10:57 mypc NetworkManager: <info>
-----------------------------------------

The rest of the networkmanager entries in the log are about the
192.168 range. I saw nothing strange there, but I can post it if
needed.

My openvpn command line is:

/usr/sbin/openvpn --client --dev tap --proto udp --remote
vpn.company.nl 1195 --nobind --persist-key --persist-tun --ca
/etc/vpn/ca.crt --ns-cert-type server --comp-lzo --verb 3
--auth-user-pass --user me --group nogroup --daemon


Thanks for your time!

Greetings,
Ronald.


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]