Find the answer to your Linux question:
Results 1 to 7 of 7
Hello. I'm trying to connect to a VPN network (which, at my school, is the ONLY way to connect to the Internet both in the dorms and elsewhere). Before I ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Feb 2008
    Posts
    4

    VPN through DNS?


    Hello. I'm trying to connect to a VPN network (which, at my school, is the ONLY way to connect to the Internet both in the dorms and elsewhere). Before I can connect to the PPTP VPN, I need to connect to a PPPoE DNS. The first connection (the DNS one) appears to work; however, when I try to connect to the VPN I am told that the host name does not exist. I got in contact with one of the server people at my school, who told me that my DNS connection may not be forwarding the IP connection to the VPN.

    The connection I'm trying to make is Ethernet, not wireless. My modem is an ATI Technologies Inc SB400 AC'97. I run FC7.

    Even if I do not have Internet on my computer, I have a flash drive and can go on lab computers. (I do not, however, have the ability to configure anything involving my network via System > Administration > Network because it has a bug. My computer also does not recognize the command "pon".)

    How can I resolve this to make the DNS connection work properly and the VPN connect? Please tell me if you would like any more information.

    Thanks!

  2. #2
    Linux Enthusiast
    Join Date
    Apr 2004
    Location
    UK
    Posts
    682
    Once you have established the first VPN connection, edit /etc/resolv.conf and put in an extra nameserver line with the IP of the DNS server over the VPN (not the public IP) before any existing nameserver lines. Then try the second VPN.

    If that works could you send us some more details on how you get to VPN going and we may be able to automate the process.

    Let us know how you get on,

    Chris...
    To be good, you must first be bad. "Newbie" is a rank, not a slight.

  3. #3
    Just Joined!
    Join Date
    Feb 2008
    Posts
    4
    All right. When I edit the /etc/resolv.conf file, this is what happens. I ran ifconfig between my connection attempts to prove that stuff was actually happening:

    PHP Code:
    [root@localhost ~]# pppd call normandic2_back
    Plugin /usr/lib/pppd/2.4.4/rp-pppoe.so loaded.
    RP-PPPoE plugin version 3.3 compiled against pppd 2.4.4
    Using 
    interface ppp0
    Connect
    ppp0 <--> eth0
    CHAP authentication succeeded
    peer from calling number 00
    :17:A4:10:4A:55 authorized
    local  IP address 10.0.18.114
    remote IP address 134.219.136.4
    primary   DNS address 134.219.136.4
    secondary DNS address 134.219.136.4
    [root@localhost ~]# ifconfig
    eth0      Link encap:Ethernet  HWaddr 00:0F:B0:74:C0:F9  
              inet addr
    :172.16.18.66  Bcast:172.16.19.255  Mask:255.255.252.0
              inet6 addr
    2002:86db:a259:4:20f:b0ff:fe74:c0f9/64 Scope:Global
              
    inet6 addrfec0::4:20f:b0ff:fe74:c0f9/64 Scope:Site
              inet6 addr
    fe80::20f:b0ff:fe74:c0f9/64 Scope:Link
              UP BROADCAST RUNNING MULTICAST  MTU
    :1500  Metric:1
              RX packets
    :37248 errors:0 dropped:0 overruns:0 frame:0
              TX packets
    :1583 errors:0 dropped:0 overruns:0 carrier:0
              collisions
    :0 txqueuelen:1000 
              RX bytes
    :4302759 (4.1 MiB)  TX bytes:156490 (152.8 KiB)
              
    Interrupt:22 Base address:0xc400 

    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
    :8349 errors:0 dropped:0 overruns:0 frame:0
              TX packets
    :8349 errors:0 dropped:0 overruns:0 carrier:0
              collisions
    :0 txqueuelen:
              RX bytes
    :58033182 (55.3 MiB)  TX bytes:58033182 (55.3 MiB)

    ppp0      Link encap:Point-to-Point Protocol  
              inet addr
    :10.0.18.114  P-t-P:134.219.136.4  Mask:255.255.255.255
              UP POINTOPOINT RUNNING NOARP MULTICAST  MTU
    :1450  Metric:1
              RX packets
    :6 errors:0 dropped:0 overruns:0 frame:0
              TX packets
    :19 errors:0 dropped:0 overruns:0 carrier:0
              collisions
    :0 txqueuelen:
              RX bytes
    :461 (461.0 b)  TX bytes:1053 (1.0 KiB)

    wlan0     Link encap:Ethernet  HWaddr 00:14:A5:10:76:7A  
              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 b)  TX bytes:(0.0 b)

    wmaster0  Link encap:UNSPEC  HWaddr 00-14-A5-10-76-7A-88-23-00-00-00-00-00-00-00-00  
              UP BROADCAST RUNNING 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 b)  TX bytes:(0.0 b)

    [
    root@localhost ~]# pppd call roamnode2_back
    Using interface ppp1
    Connect
    ppp1 <--> /dev/pts/3
    CHAP authentication succeeded
    MPPE 128
    -bit stateless compression enabled
    local  IP address 134.219.136.105
    remote IP address 134.219.136.4
    [root@localhost ~]# ifconfig
    eth0      Link encap:Ethernet  HWaddr 00:0F:B0:74:C0:F9  
              inet addr
    :172.16.18.66  Bcast:172.16.19.255  Mask:255.255.252.0
              inet6 addr
    2002:86db:a259:4:20f:b0ff:fe74:c0f9/64 Scope:Global
              
    inet6 addrfec0::4:20f:b0ff:fe74:c0f9/64 Scope:Site
              inet6 addr
    fe80::20f:b0ff:fe74:c0f9/64 Scope:Link
              UP BROADCAST RUNNING MULTICAST  MTU
    :1500  Metric:1
              RX packets
    :42771 errors:0 dropped:0 overruns:0 frame:0
              TX packets
    :1790 errors:0 dropped:0 overruns:0 carrier:0
              collisions
    :0 txqueuelen:1000 
              RX bytes
    :4937313 (4.7 MiB)  TX bytes:175472 (171.3 KiB)
              
    Interrupt:22 Base address:0xc400 

    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
    :8349 errors:0 dropped:0 overruns:0 frame:0
              TX packets
    :8349 errors:0 dropped:0 overruns:0 carrier:0
              collisions
    :0 txqueuelen:
              RX bytes
    :58033182 (55.3 MiB)  TX bytes:58033182 (55.3 MiB)

    ppp0      Link encap:Point-to-Point Protocol  
              inet addr
    :10.0.18.114  P-t-P:134.219.136.4  Mask:255.255.255.255
              UP POINTOPOINT RUNNING NOARP MULTICAST  MTU
    :1450  Metric:1
              RX packets
    :65 errors:0 dropped:0 overruns:0 frame:0
              TX packets
    :214 errors:0 dropped:0 overruns:0 carrier:0
              collisions
    :0 txqueuelen:
              RX bytes
    :4366 (4.2 KiB)  TX bytes:15059 (14.7 KiB)

    ppp1      Link encap:Point-to-Point Protocol  
              inet addr
    :134.219.136.105  P-t-P:134.219.136.4  Mask:255.255.255.255
              UP POINTOPOINT RUNNING NOARP MULTICAST  MTU
    :1196  Metric:1
              RX packets
    :8 errors:0 dropped:0 overruns:0 frame:0
              TX packets
    :8 errors:0 dropped:0 overruns:0 carrier:0
              collisions
    :0 txqueuelen:
              RX bytes
    :101 (101.0 b)  TX bytes:89 (89.0 b)

    wlan0     Link encap:Ethernet  HWaddr 00:14:A5:10:76:7A  
              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 b)  TX bytes:(0.0 b)

    wmaster0  Link encap:UNSPEC  HWaddr 00-14-A5-10-76-7A-B8-A9-00-00-00-00-00-00-00-00  
              UP BROADCAST RUNNING 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 b)  TX bytes:(0.0 b
    I used the DNS connection's "134.219.136.4" in /etc/resolv.conf. When I open up a web browser (Firefox or the command line one that's in Fedora 7), it still refuses to go anywhere even though the pptp connection claims to have connected.

    This is what happens when I ping a web site from command line:
    PHP Code:
    [root@localhost peers]# ping rhul.ac.uk
    PING rhul.ac.uk (134.219.204.3556(84bytes of data
    Thanks for the advice, though. This got me a bit farther than a lot of the things that I have tried, and I look forward to getting it to work.

  4. $spacer_open
    $spacer_close
  5. #4
    Linux Enthusiast
    Join Date
    Apr 2004
    Location
    UK
    Posts
    682
    Can I get you to run "route -n" before and after you set all that up, then ping again.

    I'm slightly unsure of what your problem is. Before I assumed it was a DNS problem, but pppd should have set up the resolv.conf file by itself. Ah well, we will carry on regardless and see what comes out of it.

    Let us know how you get on,

    Chris...
    To be good, you must first be bad. "Newbie" is a rank, not a slight.

  6. #5
    Just Joined!
    Join Date
    Feb 2008
    Posts
    4
    Sure thing. (As for what my problem is, I'm likely about twice as unsure.) Thanks for the assistance.

    [root@localhost ~]# route -n
    Kernel IP routing table
    Destination Gateway Genmask Flags Metric Ref Use Iface
    172.16.16.0 0.0.0.0 255.255.252.0 U 0 0 0 eth0
    [root@localhost ~]# pppd call normandic2_back
    Plugin /usr/lib/pppd/2.4.4/rp-pppoe.so loaded.
    RP-PPPoE plugin version 3.3 compiled against pppd 2.4.4
    Using interface ppp0
    Connect: ppp0 <--> eth0
    CHAP authentication succeeded
    peer from calling number 00:17:A4:A9:75:51 authorized
    local IP address 10.0.17.141
    remote IP address 134.219.162.4
    primary DNS address 134.219.162.4
    secondary DNS address 134.219.162.4
    [root@localhost ~]# pppd call roamnode2_back
    Using interface ppp1
    Connect: ppp1 <--> /dev/pts/2
    CHAP authentication succeeded
    MPPE 128-bit stateless compression enabled
    local IP address 134.219.162.126
    remote IP address 134.219.162.4
    [root@localhost ~]# route -n
    Kernel IP routing table
    Destination Gateway Genmask Flags Metric Ref Use Iface
    134.219.162.4 0.0.0.0 255.255.255.255 UH 0 0 0 ppp0
    134.219.162.4 0.0.0.0 255.255.255.255 UH 0 0 0 ppp1
    172.16.16.0 0.0.0.0 255.255.252.0 U 0 0 0 eth0
    0.0.0.0 0.0.0.0 0.0.0.0 U 0 0 0 ppp0
    [root@localhost ~]# ping google.com
    PING google.com (64.233.167.99) 56(84) bytes of data.

    I stopped the ping attempt after a few minutes.

  7. #6
    Linux Enthusiast
    Join Date
    Apr 2004
    Location
    UK
    Posts
    682
    Ok, here is what I think is going on. When you connect the first VPN link you are getting a default gateway. Then the default gateway for the second VPN is rejected because you already have one set up. IIRC this is default behaviour for pppd, I had this problem when trying out a modem while I had another active Internet connection.

    Try removing the route for 0.0.0.0

    Code:
    route del 0.0.0.0 netmask 0.0.0.0
    Then add a new route using the second pppd device.

    Code:
    route add default gw 134.219.162.4 dev ppp1
    Unfortunately those commands are pretty much from memory so they may not be exactly right, but I think they should set things up correctly. Check the route man pages for more details.

    Let us know how you get on,

    Chris...
    To be good, you must first be bad. "Newbie" is a rank, not a slight.

  8. #7
    Just Joined!
    Join Date
    Feb 2008
    Posts
    4
    All right. This is what happens:

    Code:
    [root@localhost ~]# route -n
    Kernel IP routing table
    Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
    134.219.136.4   0.0.0.0         255.255.255.255 UH    0      0        0 ppp0
    172.16.16.0     0.0.0.0         255.255.252.0   U     0      0        0 eth0
    [root@localhost ~]# killall pppd
    [root@localhost ~]# pppd call normandic2_back
    Plugin /usr/lib/pppd/2.4.4/rp-pppoe.so loaded.
    RP-PPPoE plugin version 3.3 compiled against pppd 2.4.4
    Using interface ppp0
    Connect: ppp0 <--> eth0
    CHAP authentication succeeded
    peer from calling number 00:17:A4:A9:75:51 authorized
    local  IP address 10.0.17.149
    remote IP address 134.219.162.4
    primary   DNS address 134.219.162.4
    secondary DNS address 134.219.162.4
    [root@localhost ~]# pppd call roamnode2_back
    Using interface ppp1
    Connect: ppp1 <--> /dev/pts/4
    CHAP authentication succeeded
    MPPE 128-bit stateless compression enabled
    local  IP address 134.219.162.119
    remote IP address 134.219.162.4
    [root@localhost ~]# route -n
    Kernel IP routing table
    Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
    134.219.162.4   0.0.0.0         255.255.255.255 UH    0      0        0 ppp0
    134.219.162.4   0.0.0.0         255.255.255.255 UH    0      0        0 ppp1
    172.16.16.0     0.0.0.0         255.255.252.0   U     0      0        0 eth0
    0.0.0.0         0.0.0.0         0.0.0.0         U     0      0        0 ppp0
    [root@localhost ~]# route del -net 0.0.0.0 netmask 0.0.0.0
    [root@localhost ~]# route -n
    Kernel IP routing table
    Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
    134.219.162.4   0.0.0.0         255.255.255.255 UH    0      0        0 ppp0
    134.219.162.4   0.0.0.0         255.255.255.255 UH    0      0        0 ppp1
    172.16.16.0     0.0.0.0         255.255.252.0   U     0      0        0 eth0
    [root@localhost ~]# route add default gw 134.219.162.4 dev ppp1
    SIOCADDRT: No such device
    [root@localhost ~]# route add default gw 134.219.162.4
    [root@localhost ~]# route -n
    Kernel IP routing table
    Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
    134.219.162.4   0.0.0.0         255.255.255.255 UH    0      0        0 ppp0
    172.16.16.0     0.0.0.0         255.255.252.0   U     0      0        0 eth0
    0.0.0.0         134.219.162.4   0.0.0.0         UG    0      0        0 ppp0
    [root@localhost ~]# pppd call roamnode2_back
    Using interface ppp1
    Connect: ppp1 <--> /dev/pts/4
    CHAP authentication succeeded
    MPPE 128-bit stateless compression enabled
    local  IP address 134.219.162.11
    remote IP address 134.219.162.4
    [root@localhost ~]# route -n
    Kernel IP routing table
    Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
    134.219.162.4   0.0.0.0         255.255.255.255 UH    0      0        0 ppp0
    134.219.162.4   0.0.0.0         255.255.255.255 UH    0      0        0 ppp1
    172.16.16.0     0.0.0.0         255.255.252.0   U     0      0        0 eth0
    0.0.0.0         134.219.162.4   0.0.0.0         UG    0      0        0 ppp0
    [root@localhost ~]# ping google.com
    PING google.com (64.233.187.99) 56(84) bytes of data.
    
    --- google.com ping statistics ---
    19 packets transmitted, 0 received, 100% packet loss, time 17999ms
    I tried using "route add default 134.219.162.4 dev ppp1," but the command didn't exist. When I looked at the man page, it gave the following sample on adding default routes:

    route add default gw mango-gw
    adds a default route (which will be used if no other route
    matches). All packets using this route will be gatewayed
    through "mango-gw". The device which will actually be used
    for that route depends on how we can reach "mango-gw" - the
    static route to "mango-gw" will have to be set up before.
    It does not give guidelines for adding default routes in the way you suggested, and it's a rather short man page (I'm comparing it to the one on pppd). I discarded the "dev ppp1" part to see what it would do, and it did something, so the problem only exists in that section of the command. This is what's possible to do with route:

    SYNOPSIS
    route [-CFvnee]

    route [-v] [-A family] add [-net|-host] target [netmask Nm] [gw Gw]
    [metric N] [mss M] [window W] [irtt I] [reject] [mod] [dyn]
    [reinstate] [[dev] If]

    route [-v] [-A family] del [-net|-host] target [gw Gw] [netmask Nm]
    [metric N] [[dev] If]

    route [-V] [--version] [-h] [--help]
    And this is where I confess that I'm terrible at piecing though what the stuff in the brackets actually means. The online tutorials I read on using command line never really covered that, and I usually compensate for my man semi-literacy with Google searches.

Posting Permissions

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