View Single Post
Old 10th November 2009, 05:10
Deficit Deficit is offline
Junior Member
Join Date: Jun 2009
Posts: 11
Thanks: 0
Thanked 0 Times in 0 Posts
Default openvpn I cant ping or get connection to the internet through vpn

Edit: This is now fixed. I had to change the DNS from my ISP's to the VPN provider's to make it work.

I have installed debian lenny and ispconfig 3 using the perfect setup. Now I've got a vpn account but I have some issues making it work on Linux.

However, I did make it work using openvpn for Windows XP with GUI (exact same configuration settings). Then I was able to surf around with the IP of the vpn server.

So, this is what I've done.

Downloaded and installed openvpn using apt-get install openvpn

Made a /etc/openvpn/openvpn.conf file with the following contents:
dev tap
remote 88.80.xx.xx
float 88.80.xx.xx
dhcp-option DNS 88.80.xx.xx
port 5122
ifconfig 88.80.xx.xx
route-gateway 88.80.xx.xx
redirect-gateway def1
secret key.txt
cipher AES-128-CBC
My box is behind a router, so I've forwarded port 5122 (both UDP/TCP) to the internal IP of the machine running openvpn.

Furthermore I've included the key in key.txt and restarted openvpn using /etc/init.d/openvpn restart

When I try to ping, there is about 1 minute wait and I get
ping: unknown host
When I run route, there is a 2-3 minute wait until all results are displayed and I get
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
88.80.xx.xx UGH   0      0        0 eth0
88.80.xx.xx      *      U     0      0        0 tap0     *        U     0      0        0 eth0
default         88.80.xx.xx       UG    0      0        0 tap0       88.80.xx.xx       UG    0      0        0 tap0
default         UG    0      0        0 eth0
If I try to run nslookup there is a long halt, and then
;; connection timed out; no servers could be reached
I can ping internal IPs, and I'm connected to the box from behind the router using SSH.

This is what my /etc/network/interfaces looks like
# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).

# The loopback network interface
auto lo
iface lo inet loopback

# The primary network interface
#allow-hotplug eth0
#iface eth0 inet dhcp

# The primary network interface
auto eth0
iface eth0 inet static

Last edited by Deficit; 10th November 2009 at 13:55. Reason: removed a misplaced trailing slash
Reply With Quote
Sponsored Links