If this is your first visit, be sure to
check out the FAQ by clicking the
link above. You may have to register
before you can post: click the register link above to proceed. To start viewing messages,
select the forum that you want to visit from the selection below. ** If you are logged in, most ads will not be displayed. **

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.

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.

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.

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.

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.

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:

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.