Go Back   HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials > Linux Forums > Server Operation

Do you like HowtoForge? Please consider supporting us by becoming a subscriber.
Thread Tools Display Modes
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 google.com, there is about 1 minute wait and I get
ping: unknown host google.com
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 google.com 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
Old 11th November 2009, 11:04
Ben Ben is offline
Join Date: Jul 2006
Posts: 1,029
Thanks: 7
Thanked 62 Times in 56 Posts

So what basically happens is in your case all VPN traffic (no matter of the target) is sent to your openvpn server. But as your tunnel IPs are not routed as they are private, your vpn server needs to NAT these stuff. And this you need to set up.

Maybe this points you a bit more in the right direction: http://serverfault.com/questions/902...es-nat-routing
Reply With Quote


connection problems, network problem, openvpn, ping, vpn

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
ispconfig 3 cant receive emails lishaw1968 Installation/Configuration 25 19th August 2013 11:37
Debian Lenny apt-get update failed to fetch qriz Installation/Configuration 3 31st October 2009 23:19
Attacks on MTA dclardy Installation/Configuration 4 29th September 2009 17:50
Mail not working epicuniversal General 5 13th June 2009 09:24
debian etch courier pop3 issue docean Installation/Configuration 6 20th March 2008 16:38

All times are GMT +2. The time now is 03:34.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.