Page 1 of 4 123 ... LastLast
Results 1 to 10 of 33

Thread: OpenVPN connects to VPN but no internet (Ubuntu 10.10 64-bit)

  1. #1
    Join Date
    Jan 2011
    Beans
    10

    Question OpenVPN connects to VPN but no internet (Ubuntu 10.10 64-bit)

    Hello,

    I use vpntunnel.se and followed their tutorial for OpenVPN and it connects and assigns an IP. However, once the sequence is initiated and I open my browser I cannot connect to a webpage and get a "cannot resolve" error.

    I e-mailed their support and they suggested I change the DNS of my network settings. I did that but the same problem. Once I close OpenVPN my internet works again.

    It works in windows, so I know it is not my router...

    I use a wireless connection with my router. I don't know if this has something to do with anything...

    I would really appreciate some assistance I have been on forums the last few days but I couldn't find anything that solved my problem.

    Hoping someone can help me as this is a serious headache for me. .

  2. #2
    Join Date
    Nov 2007
    Location
    Newry, Northern Ireland
    Beans
    1,258

    Re: OpenVPN connects to VPN but no internet (Ubuntu 10.10 64-bit)

    It sounds like your default route is not being set correctly when your VPN connection is brought up.

    Can you post your routing table when no VPN connection is connected and when it is connected, and we can have a look where the problem lies.
    Can't think of anything profound or witty.
    My Blog: http://gonzothegeek.blogspot.co.uk/

  3. #3
    Join Date
    Jan 2011
    Beans
    10

    Re: OpenVPN connects to VPN but no internet (Ubuntu 10.10 64-bit)

    Firstly, thank you for your reply.

    I am attaching the conf file I input into network manager -- but as I said it seems to connect correctly. I just added 8.8.4.4 as suggested by someone else as a dns server but it seems not to work.

    As for the information requested, could you please assist me in how to find that information for you

    I am not as newbie as I seem, I just haven't used Linux in almost a decade lol. Slackware 6.0 I think was the last distro I used.
    Attached Files Attached Files

  4. #4
    Join Date
    Jan 2011
    Beans
    10

    Re: OpenVPN connects to VPN but no internet (Ubuntu 10.10 64-bit)

    Found the routing table, first instance is without the VPN enabled, the second with.


    user@ubuntu:~$ netstat -nr
    Kernel IP routing table
    Destination Gateway Genmask Flags MSS Window irtt Iface
    192.168.1.0 0.0.0.0 255.255.255.0 U 0 0 0 wlan0
    169.254.0.0 0.0.0.0 255.255.0.0 U 0 0 0 wlan0
    0.0.0.0 192.168.1.1 0.0.0.0 UG 0 0 0 wlan0

    user@ubuntu:~$ netstat -nr
    Kernel IP routing table
    Destination Gateway Genmask Flags MSS Window irtt Iface
    178.73.212.226 192.168.1.1 255.255.255.255 UGH 0 0 0 wlan0
    192.168.1.0 0.0.0.0 255.255.255.0 U 0 0 0 wlan0
    178.73.206.0 0.0.0.0 255.255.255.0 U 0 0 0 tap0
    169.254.0.0 0.0.0.0 255.255.0.0 U 0 0 0 wlan0
    0.0.0.0 178.73.206.1 0.0.0.0 UG 0 0 0 tap0
    Last edited by MedianN; January 7th, 2011 at 09:37 PM.

  5. #5
    Join Date
    Nov 2007
    Location
    Newry, Northern Ireland
    Beans
    1,258

    Re: OpenVPN connects to VPN but no internet (Ubuntu 10.10 64-bit)

    I'll have another look, but the second routing table does not seem quite right to me. I have to go now, but I'll have a look at it later.

    Any chance you could also show the output of
    Code:
    ifconfig tap0
    and
    Code:
    ifconfig eth0
    both while the VPN is connected so I can see what settings are applied to the different network adapters.
    Last edited by spynappels; January 6th, 2011 at 05:52 PM. Reason: forgot code tags
    Can't think of anything profound or witty.
    My Blog: http://gonzothegeek.blogspot.co.uk/

  6. #6
    Join Date
    Jan 2011
    Beans
    10

    Re: OpenVPN connects to VPN but no internet (Ubuntu 10.10 64-bit)

    Here is tap0, eth0 and wlan0 all whilst the vpn is connected. [I am on a laptop using a wireless connection to my router.]

    user@ubuntu:~$ ifconfig tap0
    tap0 Link encap:Ethernet HWaddr ca:38:8a:c8:d9:54
    inet addr:188.126.69.187 Bcast:188.126.69.255 Mask:255.255.255.0
    inet6 addr: fe80::c838:8aff:fec8:d954/64 Scope:Link
    UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
    RX packets:392 errors:0 dropped:0 overruns:0 frame:0
    TX packets:16 errors:0 dropped:0 overruns:0 carrier:0
    collisions:0 txqueuelen:100
    RX bytes:19043 (19.0 KB) TX bytes:3043 (3.0 KB)

    users@ubuntu:~$ ifconfig eth0
    eth0 Link encap:Ethernet HWaddr 00:26:22:e9:50:1b
    UP BROADCAST MULTICAST MTU:1500 Metric:1
    RX packets:0 errors:0 dropped:0 overruns:0 frame:0
    TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
    collisions:0 txqueuelen:1000
    RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)
    Interrupt:45 Base address:0xe000

    users@ubuntu:~$ ifconfig wlan0
    wlan0 Link encap:Ethernet HWaddr 00:26:b6:6f:f6:91
    inet addr:192.168.1.2 Bcast:192.168.1.255 Mask:255.255.255.0
    inet6 addr: fe80::226:b6ff:fe6f:f691/64 Scope:Link
    UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
    RX packets:273595 errors:0 dropped:0 overruns:0 frame:0
    TX packets:343586 errors:0 dropped:0 overruns:0 carrier:0
    collisions:0 txqueuelen:1000
    RX bytes:104642162 (104.6 MB) TX bytes:25816458 (25.8 MB)
    Last edited by MedianN; January 6th, 2011 at 06:48 PM. Reason: Removed duplicate tap0 paste

  7. #7
    Join Date
    Jan 2011
    Location
    Budapest HUngary
    Beans
    4
    Distro
    Ubuntu 10.04 Lucid Lynx

    Re: OpenVPN connects to VPN but no internet (Ubuntu 10.10 64-bit)

    I've got the same problem, strill trying to resolve with google but no result yet

    http://ubuntuforums.org/showthread.php?t=1658384

  8. #8
    Join Date
    Nov 2007
    Location
    London, England
    Beans
    7,699

    Re: OpenVPN connects to VPN but no internet (Ubuntu 10.10 64-bit)

    Please can you post the output from these commands, both without the VPN running and then with it running:
    Code:
    ifconfig
    route -n
    cat /etc/resolv.conf
    ping -c3 91.189.94.186
    ping -c3 ubuntuforums.com
    Also, are you running a firewall? If so, do things work if you disable it?

  9. #9
    Join Date
    Jan 2011
    Beans
    10

    Re: OpenVPN connects to VPN but no internet (Ubuntu 10.10 64-bit)

    Thank you for joining the discussion!

    I don't run a firewall, except if its programmed into the Ubuntu install, then I have the default settings enabled for that. If you want me to test that please let me know how to disable and re-enable it.

    Without VPN enabled:
    Code:
    user@ubuntu:~$ ifconfig
    eth0      Link encap:Ethernet  HWaddr 00:26:22:e9:50:1b  
              UP BROADCAST MULTICAST  MTU:1500  Metric:1
              RX packets:0 errors:0 dropped:0 overruns:0 frame:0
              TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
              collisions:0 txqueuelen:1000 
              RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)
              Interrupt:45 Base address:0x2000 
    
    lo        Link encap:Local Loopback  
              inet addr:127.0.0.1  Mask:255.0.0.0
              inet6 addr: ::1/128 Scope:Host
              UP LOOPBACK RUNNING  MTU:16436  Metric:1
              RX packets:60 errors:0 dropped:0 overruns:0 frame:0
              TX packets:60 errors:0 dropped:0 overruns:0 carrier:0
              collisions:0 txqueuelen:0 
              RX bytes:4496 (4.4 KB)  TX bytes:4496 (4.4 KB)
    
    wlan0     Link encap:Ethernet  HWaddr 00:26:b6:6f:f6:91  
              inet addr:192.168.1.2  Bcast:192.168.1.255  Mask:255.255.255.0
              inet6 addr: fe80::226:b6ff:fe6f:f691/64 Scope:Link
              UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
              RX packets:898 errors:0 dropped:0 overruns:0 frame:0
              TX packets:900 errors:0 dropped:0 overruns:0 carrier:0
              collisions:0 txqueuelen:1000 
              RX bytes:623181 (623.1 KB)  TX bytes:138933 (138.9 KB)
    Code:
    user@ubuntu:~$ route -n
    Kernel IP routing table
    Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
    192.168.1.0     0.0.0.0         255.255.255.0   U     2      0        0 wlan0
    169.254.0.0     0.0.0.0         255.255.0.0     U     1000   0        0 wlan0
    0.0.0.0         192.168.1.1     0.0.0.0         UG    0      0        0 wlan0
    Code:
    user@ubuntu:~$ cat /etc/resolv.conf
    # Dynamic resolv.conf(5) file for glibc resolver(3) generated by resolvconf(8)
    #     DO NOT EDIT THIS FILE BY HAND -- YOUR CHANGES WILL BE OVERWRITTEN
    nameserver 8.8.8.8
    nameserver 8.8.4.4
    Code:
    user@ubuntu:~$ ping -c3 91.189.94.186
    PING 91.189.94.186 (91.189.94.186) 56(84) bytes of data.
    64 bytes from 91.189.94.186: icmp_req=1 ttl=48 time=287 ms
    64 bytes from 91.189.94.186: icmp_req=2 ttl=48 time=287 ms
    64 bytes from 91.189.94.186: icmp_req=3 ttl=48 time=288 ms
    
    --- 91.189.94.186 ping statistics ---
    3 packets transmitted, 3 received, 0% packet loss, time 2002ms
    rtt min/avg/max/mdev = 287.442/287.818/288.566/0.814 ms
    Code:
    user@ubuntu:~$ ping -c3 ubuntuforums.com
    PING ubuntuforums.com (91.189.94.186) 56(84) bytes of data.
    64 bytes from ohiggins.canonical.com (91.189.94.186): icmp_req=1 ttl=48 time=286 ms
    64 bytes from ohiggins.canonical.com (91.189.94.186): icmp_req=2 ttl=48 time=287 ms
    64 bytes from ohiggins.canonical.com (91.189.94.186): icmp_req=3 ttl=48 time=285 ms
    
    --- ubuntuforums.com ping statistics ---
    3 packets transmitted, 3 received, 0% packet loss, time 1999ms
    rtt min/avg/max/mdev = 285.630/286.637/287.592/0.801 ms

    With VPN enabled:

    Code:
    user@ubuntu:~$ ifconfig
    eth0      Link encap:Ethernet  HWaddr 00:26:22:e9:50:1b  
              UP BROADCAST MULTICAST  MTU:1500  Metric:1
              RX packets:0 errors:0 dropped:0 overruns:0 frame:0
              TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
              collisions:0 txqueuelen:1000 
              RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)
              Interrupt:45 Base address:0x2000 
    
    lo        Link encap:Local Loopback  
              inet addr:127.0.0.1  Mask:255.0.0.0
              inet6 addr: ::1/128 Scope:Host
              UP LOOPBACK RUNNING  MTU:16436  Metric:1
              RX packets:73 errors:0 dropped:0 overruns:0 frame:0
              TX packets:73 errors:0 dropped:0 overruns:0 carrier:0
              collisions:0 txqueuelen:0 
              RX bytes:5312 (5.3 KB)  TX bytes:5312 (5.3 KB)
    
    tap0      Link encap:Ethernet  HWaddr 12:c4:e3:d3:4b:3b  
              inet addr:178.73.209.186  Bcast:178.73.209.255  Mask:255.255.255.0
              inet6 addr: fe80::10c4:e3ff:fed3:4b3b/64 Scope:Link
              UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
              RX packets:634 errors:0 dropped:0 overruns:0 frame:0
              TX packets:16 errors:0 dropped:0 overruns:0 carrier:0
              collisions:0 txqueuelen:100 
              RX bytes:40375 (40.3 KB)  TX bytes:3043 (3.0 KB)
    
    wlan0     Link encap:Ethernet  HWaddr 00:26:b6:6f:f6:91  
              inet addr:192.168.1.2  Bcast:192.168.1.255  Mask:255.255.255.0
              inet6 addr: fe80::226:b6ff:fe6f:f691/64 Scope:Link
              UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
              RX packets:1886 errors:0 dropped:0 overruns:0 frame:0
              TX packets:1212 errors:0 dropped:0 overruns:0 carrier:0
              collisions:0 txqueuelen:1000 
              RX bytes:822348 (822.3 KB)  TX bytes:187811 (187.8 KB)
    Code:
    user@ubuntu:~$ route -n
    Kernel IP routing table
    Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
    178.73.212.230  192.168.1.1     255.255.255.255 UGH   0      0        0 wlan0
    178.73.209.0    0.0.0.0         255.255.255.0   U     0      0        0 tap0
    192.168.1.0     0.0.0.0         255.255.255.0   U     2      0        0 wlan0
    169.254.0.0     0.0.0.0         255.255.0.0     U     1000   0        0 wlan0
    0.0.0.0         178.73.209.1    0.0.0.0         UG    0      0        0 tap0
    Code:
    user@ubuntu:~$ cat /etc/resolv.conf
    # Dynamic resolv.conf(5) file for glibc resolver(3) generated by resolvconf(8)
    #     DO NOT EDIT THIS FILE BY HAND -- YOUR CHANGES WILL BE OVERWRITTEN
    nameserver 80.67.0.2
    nameserver 91.213.246.2
    nameserver 8.8.8.8
    Code:
    user@ubuntu:~$ ping -c3 91.189.94.186
    PING 91.189.94.186 (91.189.94.186) 56(84) bytes of data.
    ping: sendmsg: Operation not permitted
    ping: sendmsg: Operation not permitted
    ping: sendmsg: Operation not permitted
    
    --- 91.189.94.186 ping statistics ---
    3 packets transmitted, 0 received, 100% packet loss, time 2005ms
    Code:
    user@ubuntu:~$ ping -c3 ubuntuforums.com
    ping: unknown host ubuntuforums.com

  10. #10
    Join Date
    Nov 2007
    Location
    London, England
    Beans
    7,699

    Re: OpenVPN connects to VPN but no internet (Ubuntu 10.10 64-bit)

    OK, looking at your results, I can see the following:

    Starting the VPN has created a tap interface and given it a valid IP address. Good.

    Your new routing table looks good: Default route over the VPN, but there is a specific route to the VPN server over the wireless interface so that OpenVPN can still reach the server.

    Resolv.conf shows that the VPN has changed your nameserver to their own.
    You have lost the original 8.8.4.4 nameserver, so presumably when you end the VPN, you won't have a backup name server any more. Mildly bad, but not the cause of your problems.

    Ping to a specific IP address fails. Bad. I expected this to work. It seems that you are unable to send packets out over the VPN. This would prevent the name lookup in the next test from working. I found this thread: http://ubuntuforums.org/showthread.php?t=345251 which suggests this is a firewall configuration issue. Please can you also post the output of the command
    Code:
    sudo iptables-save -c
    both with and without the VPN connected.

Page 1 of 4 123 ... LastLast

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •