configuring routing table :)
hello,
I just configured my l2tp-vpn client and I'm having a little problem which somehow it my routing tables doesn't work and it's still uses the old connection (not I'm connected through a vpn and through a router). Code:
root at /home/cookie/Desktop/cable# cable-start so it will be like this : destination (default gw : 0.0.0.0), gateway 192.168.1.1 mask 0.0.0.0 USE PPP0 but I do not succeed somehow : Code:
root at /home/cookie/Desktop/cable# route del default Code:
route add -net 0.0.0.0 192.168.1.1 netmask 0.0.0.0 dev ppp0 and this one doesn't go out through 192.168.1.1 so it's not good for me... Code:
route add -net 0.0.0.0 netmask 0.0.0.0 dev ppp0 |
Code:
route add default gw 192.168.1.1 |
but I want anything to go through PPP0 to 192.168.1.1!!! not via ETH1 which is the default choice
Code:
root at /home/cookie/Desktop/cable# route add default gw 192.168.1.1 dev ppp0 |
Have you tried deleting the existing default route before running cable-start?
Beyond that, you might try using the ip command instead of the route command. ip is more powerful but I am not yet anywhere close to fluent with it. |
yes I did try to delete existing routes, it just re add the same rule (route add default gw 192.168.1.1 - in eth1).
I got so confused with the ip command's manual... any suggestions? |
Never mind what I had posted. Isn't the whole point of connecting to a vpn is to disconnect you from everything except your virtual private network? My experience is that once you are vpn connected, you are only on the private network; the internet is gone. This is to protect your private network. Of course, it can be subverted with an ethernet card and a second connection to your router.
|
Have you discussed this with your work or whomever is running the vpn? Do they have a gateway address you should be using? The command is of the form:
Code:
route add default gw 192.168.1.1 ppp0 |
Code:
root at /home/cookie/Desktop/cable# route del default gw 192.168.1.1 the VPN is actually the ISP and I want my network to use the vpn instead of the default gw since it's faster internet (lower ping, same bandwith of-course).. |
Quote:
|
Well, so far I've found this:
Quote:
|
in windows after you dial, the routing goes automatically via the newest route.
right or wrong way, some people will argue about that... but here that's not happening :( |
Ah, I think I've found it. It looks like you must delete your default route before making your ppp connection.
Added: As a practical matter, you will probably need a direct route to the IP you're logging ppp onto, not a default route. |
Code:
root at /home/cookie/Desktop/cable# cat /etc/ppp/pppoe.conf | grep -i default |
I'm out of ideas. You might try more along the lines of what I was doing:
google linux ppp default route |
Well, one more thing, I guess. Disable dhcp, as that's probably what's sticking the default back. Delete the route from 192.168.1.1 to 212.199.170.170 and replace it with a static route from 192.168.1.x to 212.199.170.170; where x is your actual ip. Then try to connect.
|
All times are GMT -5. The time now is 05:45 PM. |