openvpn pushed dns get lost by local dhcp

Need help configuring your VPN? Just post here and you'll get that help.

Moderators: TinCanTech, TinCanTech, TinCanTech, TinCanTech, TinCanTech, TinCanTech

Forum rules
Please use the [oconf] BB tag for openvpn Configurations. See viewtopic.php?f=30&t=21589 for an example.
Post Reply
amadom
OpenVpn Newbie
Posts: 3
Joined: Wed Sep 14, 2011 7:08 pm

openvpn pushed dns get lost by local dhcp

Post by amadom » Wed Sep 14, 2011 7:13 pm

Hello, I'm trying to configure an OpenVPN client (using ubuntu network manager). Everything is working perfectly except that the openVPN pushed DNS get overwriten by the local DHCP client. The file /etc/resolv.conf get changed to the original one (before the VPN went UP). So I cannot access the remote DNS server to resolv.

Any help will be greatly appreciated.

amadom
OpenVpn Newbie
Posts: 3
Joined: Wed Sep 14, 2011 7:08 pm

Re: openvpn pushed dns get lost by local dhcp

Post by amadom » Wed Sep 14, 2011 7:20 pm

Here's my server configuration :

Code: Select all

port 1194
proto udp
dev tun
ca ca.crt
cert server.crt
key server.key
dh dh1024.pem                                                                                                                                                                                                                                                                  
server 10.8.0.0 255.255.255.0
ifconfig-pool-persist ipp.txt
push "route 192.168.144.0 255.255.255.0"
push "route 10.0.2.0 255.255.255.0"
push "dhcp-option DNS 10.0.2.1"
push "dhcp-option WINS 10.0.2.2"
push "dhcp-option NBT 8"
keepalive 10 120
comp-lzo
user nobody
group nogroup
persist-key
persist-tun
status openvpn-status.log
verb 3
client-cert-not-required
username-as-common-name
plugin /usr/lib/openvpn/openvpn-auth-ldap.so /etc/openvpn/ldap-config/auth-ldap.conf

User avatar
janjust
Forum Team
Posts: 2703
Joined: Fri Aug 20, 2010 2:57 pm
Location: Amsterdam
Contact:

Re: openvpn pushed dns get lost by local dhcp

Post by janjust » Thu Sep 15, 2011 7:11 am

if you're using networkmanager to manage your local network as well then this should not happen ; I'm using NetworkManager 0.8+ on Fedora to manage both eth0 and my VPN connections and DNS resolution works OK (using default settings).

amadom
OpenVpn Newbie
Posts: 3
Joined: Wed Sep 14, 2011 7:08 pm

Re: openvpn pushed dns get lost by local dhcp

Post by amadom » Thu Sep 15, 2011 1:49 pm

Thank you for your reply.

I will look the DHCP server side.

Thank you !

Post Reply