vandal2 1 Posted ... Hello, I was wondering if anyone could help me out with some DNS issues I am currently experiencing. When I use the inbuilt network application within ubuntu (ubuntu network manager) I can connect to a VPN without any problems. If I use the openvpn client from the command line however I seem to have issues with DNS. When I nslookup something I get the below error: X@felicity:~$ nslookup hotmail.com Server: 127.0.1.1 Address: 127.0.1.1#53 ** server can't find hotmail.com: REFUSED As this only happens when I am using the openvpn client I don't want to go and change any dns settings etc as I don't seem to encounter this issue when I use the ubuntu network manager. Does anyone know what the issue might be? Has anyone had this problem before? I have tried to connect form the command line to 2 different servers in Romainia and Germany to make sure it wasn't some funky server issue. I am using the "Access without Client" to download the .ovpn files I need... Cheers Quote Share this post Link to post
Staff 9969 Posted ... Hello! If you don't have the resolvconf package installed you can just add the line: nameserver 10.4.0.1 at the top of your /etc/resolv.conf file (if you wish to use the Air DNS). That's because your OpenVPN client can't handle the DNS push from the OpenVPN server. You just need to modify it once and for all. Kind regards Quote Share this post Link to post
vandal2 1 Posted ... Cheers for the info. Posting the below for other people if they come across the same problem: Editing resolv.conf in Ubuntu 12.10 shows # Dynamic resolv.conf(5) file for glibc resolver(3) generated by resolvconf(8) # DO NOT EDIT THIS FILE BY HAND -- YOUR CHANGES WILL BE OVERWRITTEN nameserver 127.0.1.1 This is because they have changed the way DNS stuff is being done. So, had a Google and I have added "dns-nameservers 10.4.0.1" to /etc/network/interfaces. This **should** fix the problem. I will do some testing later on this week and update. Obviously if anyone else has come across this/fixed this then your input is more than welcome! Quote Share this post Link to post
Staff 9969 Posted ... Hello!Since you have resolvconf installed in the system, you can also (as an alternative) use the up and down directives in the .ovpn configuration file. The OpenVPN package should have put in your system the file /etc/openvpn/update-resolv-confwhich will be executed if OpenVPN finds the up and down directives:up /etc/openvpn/update-resolv-conf down /etc/openvpn/update-resolv-confKind regards Quote Share this post Link to post
vandal2 1 Posted ... I stuck with your original suggestion and added "dns-nameservers 10.4.0.1" to /etc/network/interfaces. All works fine! Thanks for your help Quote Share this post Link to post