[OpenVPN home] [Date Prev] [Date Index] [Date Next]
[OpenVPN mailing lists] [Thread Prev] [Thread Index] [Thread Next]
Web openvpn.net

[Openvpn-users] DNS Resolution issue

  • Subject: [Openvpn-users] DNS Resolution issue
  • From: "Britain Crooker" <britainc@xxxxxxxxxxxxxx>
  • Date: Wed, 7 Nov 2007 09:58:47 -0500

I have OpenVPN 2.0.9 installed on my CentOS box, and am trying to get it set up so that it routes all internet traffic through the VPN when connected.  For the most part, this seems to work.  However, for some sites (like www.google.com) it won't let me connect.
The issue seems to be when the DNS lookup returns a different host name than what is specified (like a nslookup of www.google.com returns a canonical name of www.l.google.com).  Or www.openvpn.net returns openvpn.net.  If I enter the canonical name then it works fine.  If I enter the other name the lookup fails.
I have configured the system using this command:
echo 1 > /proc/sys/net/ipv4/ip_forward
iptables -t nat -s -A POSTROUTING -j SNAT --to <my server IP>
My server doesn't have ipt_masquerade support compiled into the kernel, so I had to use that command.  I have also added the option:
push "redirect-gateway def1"
to the server.conf file.