DNS issues on Ubuntu 12.04 with OpenVPN

Solution 1:

This works for me: http://www.softwarepassion.com/solving-dns-problems-with-openvpn-on-ubuntu-box/

The important step is adding following three lines into your client openvpn config file:

script-security 2
up /etc/openvpn/update-resolv-conf
down /etc/openvpn/update-resolv-conf

Also ensure the resolvconf package is installed on the client as this script depends on it.

It works with openvpn client service or command (sudo openvpn youropenvpn.conf).

However, the Ubuntu Network Manager doesn't work for this configuration. It's an issue so far: https://bugs.launchpad.net/ubuntu/+source/openvpn/+bug/1211110

Solution 2:

When you re-installed 12.04 did you forget this step?

echo 1 > /proc/sys/net/ipv4/ip_forward

Source: https://openvpn.net/index.php/open-source/documentation/miscellaneous/88-1xhowto.html