LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 02-15-2010, 01:36 PM   #1
DigiCrime
Member
 
Registered: Dec 2002
Location: St. Louis
Distribution: All Flavors
Posts: 195

Rep: Reputation: 30
openvpn not resolving to the internet


I bought a linux vps (centOS 5.3) in the UK im in the US. The purpose to the VPN is just to grab another IP address but in the UK area. VPN connects and I can ping sites/domains but it doesn't resolve them. What things should I look for to find out why it is not working?
 
Old 02-15-2010, 02:47 PM   #2
efuenteso
LQ Newbie
 
Registered: Nov 2007
Posts: 8

Rep: Reputation: 1
try this...

Here is a link to review vpn connections like you are trying to establish. Maybe it would be just a routing problem related. follow the guide, have some fun ... play special attention to

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

sudo iptables -t nat -A POSTROUTING -s 10.8.0.0/24 -o eth0 -j MASQUERADE

http://www.ventanazul.com/webzine/ar...buntu-and-hulu

Best Regards,
 
Old 02-15-2010, 03:03 PM   #3
jefro
Moderator
 
Registered: Mar 2008
Posts: 21,982

Rep: Reputation: 3625Reputation: 3625Reputation: 3625Reputation: 3625Reputation: 3625Reputation: 3625Reputation: 3625Reputation: 3625Reputation: 3625Reputation: 3625Reputation: 3625
If you can ping www.somewhere.com then it is resolved. Do you mean that your browser can't connect through this end device?
 
Old 02-15-2010, 03:44 PM   #4
DigiCrime
Member
 
Registered: Dec 2002
Location: St. Louis
Distribution: All Flavors
Posts: 195

Original Poster
Rep: Reputation: 30
Quote:
Originally Posted by efuenteso View Post
Here is a link to review vpn connections like you are trying to establish. Maybe it would be just a routing problem related. follow the guide, have some fun ... play special attention to

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

sudo iptables -t nat -A POSTROUTING -s 10.8.0.0/24 -o eth0 -j MASQUERADE

http://www.ventanazul.com/webzine/ar...buntu-and-hulu

Best Regards,
Everything on that site appears to be the same way I have, something I am overlooking though

My IPtables are not sticking..

[root@uk ~]# iptables -L -t nat
Chain PREROUTING (policy ACCEPT)
target prot opt source destination

Chain POSTROUTING (policy ACCEPT)
target prot opt source destination

Chain OUTPUT (policy ACCEPT)
target prot opt source destination

If I put it in
[root@uk ~]# /sbin/iptables -t nat -s 10.8.0.6/32 -A POSTROUTING -j SNAT --to 78.129.159.88
[root@uk ~]# iptables -L -t nat
Chain PREROUTING (policy ACCEPT)
target prot opt source destination

Chain POSTROUTING (policy ACCEPT)
target prot opt source destination
SNAT all -- 10.8.0.6 anywhere to:78.129.159.88

Chain OUTPUT (policy ACCEPT)
target prot opt source destination

But once I reboot it goes away.

Not my biggest concern at the moment

[root@uk ~]# cat /proc/sys/net/ipv4/ip_forward
1

ifconfig

tun0 Link encap:UNSPEC HWaddr 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00
inet addr:10.8.0.1 P-t-P:10.8.0.2 Mask:255.255.255.255
UP POINTOPOINT RUNNING NOARP MULTICAST MTU:1500 Metric:1
RX packets:12 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:100
RX bytes:849 (849.0 b) TX bytes:0 (0.0 b)

Quote:
Originally Posted by jefro View Post
If you can ping www.somewhere.com then it is resolved. Do you mean that your browser can't connect through this end device?
Once the VPN connects I can get into the server of course but I can't get to anything on the internet. Says connecting, waiting on reply but times out. If I ping a site I get a IP response but request times out. If I tracert to anything other then the VPN server it just times out.


C:\Users\Ron>nslookup yahoo.com
DNS request timed out.
timeout was 2 seconds.
Server: UnKnown
Address: 208.67.222.222

DNS request timed out.
timeout was 2 seconds.
DNS request timed out.
timeout was 2 seconds.
DNS request timed out.
timeout was 2 seconds.
DNS request timed out.
timeout was 2 seconds.
*** Request to UnKnown timed-out
 
Old 02-15-2010, 05:51 PM   #5
jefro
Moderator
 
Registered: Mar 2008
Posts: 21,982

Rep: Reputation: 3625Reputation: 3625Reputation: 3625Reputation: 3625Reputation: 3625Reputation: 3625Reputation: 3625Reputation: 3625Reputation: 3625Reputation: 3625Reputation: 3625
You need to have some dns at that end.
 
Old 02-15-2010, 07:25 PM   #6
efuenteso
LQ Newbie
 
Registered: Nov 2007
Posts: 8

Rep: Reputation: 1
Please, paste this (both server and vpn client side):

route -an

Regards!

Last edited by efuenteso; 02-15-2010 at 07:26 PM.
 
Old 02-15-2010, 08:00 PM   #7
DigiCrime
Member
 
Registered: Dec 2002
Location: St. Louis
Distribution: All Flavors
Posts: 195

Original Poster
Rep: Reputation: 30
Not sure how to use the a command so -an gives nothing

route -n
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
10.8.0.2 0.0.0.0 255.255.255.255 UH 0 0 0 tun0
10.8.0.0 10.8.0.2 255.255.255.0 UG 0 0 0 tun0
192.0.2.0 0.0.0.0 255.255.255.0 U 0 0 0 venet0
169.254.0.0 0.0.0.0 255.255.0.0 U 0 0 0 venet0
0.0.0.0 192.0.2.1 0.0.0.0 UG 0 0 0 venet0

C:\>route PRINT -4
===========================================================================
Interface List
33...00 ff c9 ca f0 13 ......TAP-Win32 Adapter V9
14...00 ff 46 ad 30 52 ......Anchorfree HSS Adapter
12...00 05 5d 33 23 8d ......D-Link DFE-530TX+ PCI Adapter
17...00 50 56 c0 00 01 ......VMware Virtual Ethernet Adapter for VMnet1
18...00 50 56 c0 00 08 ......VMware Virtual Ethernet Adapter for VMnet8
31...08 00 27 00 c8 e2 ......VirtualBox Host-Only Ethernet Adapter
1...........................Software Loopback Interface 1
25...00 00 00 00 00 00 00 e0 Microsoft ISATAP Adapter
26...00 00 00 00 00 00 00 e0 Microsoft ISATAP Adapter #2
13...00 00 00 00 00 00 00 e0 Teredo Tunneling Pseudo-Interface
15...00 00 00 00 00 00 00 e0 Microsoft ISATAP Adapter #3
16...00 00 00 00 00 00 00 e0 Microsoft ISATAP Adapter #4
27...00 00 00 00 00 00 00 e0 Microsoft ISATAP Adapter #5
28...00 00 00 00 00 00 00 e0 Microsoft ISATAP Adapter #6
===========================================================================

IPv4 Route Table
===========================================================================
Active Routes:
Network Destination Netmask Gateway Interface Metric
0.0.0.0 0.0.0.0 192.168.1.1 192.168.1.46 20
127.0.0.0 255.0.0.0 On-link 127.0.0.1 306
127.0.0.1 255.255.255.255 On-link 127.0.0.1 306
127.255.255.255 255.255.255.255 On-link 127.0.0.1 306
192.168.1.0 255.255.255.0 On-link 192.168.1.46 276
192.168.1.46 255.255.255.255 On-link 192.168.1.46 276
192.168.1.255 255.255.255.255 On-link 192.168.1.46 276
192.168.56.0 255.255.255.0 On-link 192.168.56.1 276
192.168.56.1 255.255.255.255 On-link 192.168.56.1 276
192.168.56.255 255.255.255.255 On-link 192.168.56.1 276
192.168.141.0 255.255.255.0 On-link 192.168.141.1 276
192.168.141.1 255.255.255.255 On-link 192.168.141.1 276
192.168.141.255 255.255.255.255 On-link 192.168.141.1 276
192.168.222.0 255.255.255.0 On-link 192.168.222.1 276
192.168.222.1 255.255.255.255 On-link 192.168.222.1 276
192.168.222.255 255.255.255.255 On-link 192.168.222.1 276
224.0.0.0 240.0.0.0 On-link 127.0.0.1 306
224.0.0.0 240.0.0.0 On-link 192.168.56.1 276
224.0.0.0 240.0.0.0 On-link 192.168.1.46 276
224.0.0.0 240.0.0.0 On-link 192.168.222.1 276
224.0.0.0 240.0.0.0 On-link 192.168.141.1 276
255.255.255.255 255.255.255.255 On-link 127.0.0.1 306
255.255.255.255 255.255.255.255 On-link 192.168.56.1 276
255.255.255.255 255.255.255.255 On-link 192.168.1.46 276
255.255.255.255 255.255.255.255 On-link 192.168.222.1 276
255.255.255.255 255.255.255.255 On-link 192.168.141.1 276
===========================================================================
Persistent Routes:
None
 
Old 02-16-2010, 07:48 AM   #8
DigiCrime
Member
 
Registered: Dec 2002
Location: St. Louis
Distribution: All Flavors
Posts: 195

Original Poster
Rep: Reputation: 30
Quote:
Originally Posted by jefro View Post
You need to have some dns at that end.
Which end they both have working dns client and server
 
Old 02-17-2010, 11:01 AM   #9
DigiCrime
Member
 
Registered: Dec 2002
Location: St. Louis
Distribution: All Flavors
Posts: 195

Original Poster
Rep: Reputation: 30
anyone else have any further input?
 
Old 02-18-2010, 08:59 AM   #10
efuenteso
LQ Newbie
 
Registered: Nov 2007
Posts: 8

Rep: Reputation: 1
I almost forgot, sometime i has a problem alike.

The problem was the cablemodem dhcp from my isp after vpnclient install, dhcp still offers the dns servers for my isp. those were internal ip address like 10.x.x.x. so try to add the route to your dns.

im a linux user, lets say my dns server are 10.1.1.1 and 10.1.1.2 so i did at the vpn client side:

route add 10.1.1.1 mask 255.255.255.255 gw internal_ip.cablemodem.of.isp
route add 10.1.1.2 mask 255.255.255.255. gw internal_ip.cablemodem.of.isp

Regards!
 
Old 02-19-2010, 06:58 AM   #11
deadeyes
Member
 
Registered: Aug 2006
Posts: 609

Rep: Reputation: 79
As said above: you probably do not have packet forwarding enabled.
Also check if dns is working. You can easily configure a forwarding dns with bind.
Or just add a route to your local dns server (probably your router) and use the local dns.
 
Old 02-22-2010, 02:32 AM   #12
DigiCrime
Member
 
Registered: Dec 2002
Location: St. Louis
Distribution: All Flavors
Posts: 195

Original Poster
Rep: Reputation: 30
Somethings up with opendns I think. I have (had) a working one on another server that works just fine but I haven't used it in a month or so. When I connect with it I get the same result as I do on the VPS server... the other server is a live/working server with sites hosted on it. Even that one does the same thing. Maybe opendns has decided to filter stuff now
 
Old 02-22-2010, 02:45 AM   #13
DigiCrime
Member
 
Registered: Dec 2002
Location: St. Louis
Distribution: All Flavors
Posts: 195

Original Poster
Rep: Reputation: 30
Switched the one that did work to the internal DNS rather than using opendns and same result nothing. grrr nothings changed on my original one
 
Old 02-23-2010, 07:11 AM   #14
deadeyes
Member
 
Registered: Aug 2006
Posts: 609

Rep: Reputation: 79
What is your openvpn config?

Do you tunnel everything through your server?
first fix your dns issue.

If your local dns works: add a route for that ip to your normal lan interface.
 
Old 02-26-2010, 05:45 PM   #15
DigiCrime
Member
 
Registered: Dec 2002
Location: St. Louis
Distribution: All Flavors
Posts: 195

Original Poster
Rep: Reputation: 30
Quote:
Originally Posted by deadeyes View Post
What is your openvpn config?

Do you tunnel everything through your server?
first fix your dns issue.

If your local dns works: add a route for that ip to your normal lan interface.
Yea tunnel thru.. how would I add a route specifically and which interface specifically? I have 6 IPs on the server.
 
  


Reply



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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Accessing Internet via OpenVPN scng Linux - Networking 3 08-10-2009 03:55 AM
DNS not resolving internet hostnames KeenAs Linux - Networking 9 02-05-2009 03:20 AM
OpenVPN - LAN Without Internet tsj5j Linux - Networking 3 01-29-2007 06:11 AM
Internet addresses resolving VERY slowly timswim78 SUSE / openSUSE 3 12-20-2005 11:12 PM
Internet resolving host problems klutzrick Linux - General 2 11-27-2005 09:38 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 10:22 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration