Jump to content
Not connected, Your IP: 52.54.103.76
Sign in to follow this  
vandal2

[SOLVED] DNS issues - openvpn on lubuntu

Recommended Posts

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

Share this post


Link to post

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

Share this post


Link to post

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!

Share this post


Link to post

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-conf

which will be executed if OpenVPN finds the up and down directives:

up /etc/openvpn/update-resolv-conf
down /etc/openvpn/update-resolv-conf

Kind regards

Share this post


Link to post

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

Share this post


Link to post

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
  • Security Check
    Play CAPTCHA Audio
    Refresh Image
Sign in to follow this  

×
×
  • Create New...