LinuxQuestions.org
Share your knowledge at the LQ Wiki.
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-05-2010, 12:52 AM   #1
stevena
LQ Newbie
 
Registered: Oct 2009
Posts: 11

Rep: Reputation: 0
Question what routes to add in order to make VPN work?


Hi, i installed the free PacketIX vpn client on my ubuntu 9.04.
it created a virtual network adapter, i was able to configure and connect to the VPN service but when i add a default route to the routing table so that all internet traffic goes through the VPN, my internet connection stops working until i remove the line i added.

here's my routing table before :

Code:
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
192.168.222.0   0.0.0.0         255.255.255.0   U     0      0        0 eth0
169.254.0.0     0.0.0.0         255.255.0.0     U     1000   0        0 eth0
10.0.0.0        0.0.0.0         255.0.0.0       U     0      0        0 vpn_vpn
0.0.0.0         192.168.222.2   0.0.0.0         UG    0      0        0 eth0
and after i add the route:

Code:
192.168.222.0   0.0.0.0         255.255.255.0   U     0      0        0 eth0
169.254.0.0     0.0.0.0         255.255.0.0     U     1000   0        0 eth0
10.0.0.0        0.0.0.0         255.0.0.0       U     0      0        0 vpn_vpn
10.0.0.0        10.0.0.1        0.0.0.0       U     0      0        0 vpn_vpn
here's the virtual network adapter configuration :


Code:
ifconfig vpn_vpn
vpn_vpn   Link encap:Ethernet  HWaddr 00:ac:55:bc:9e:bf  
          inet addr:10.4.80.192  Bcast:10.255.255.255  Mask:255.0.0.0
          inet6 addr: fe80::2ac:55ff:febc:9ebf/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:34625 errors:0 dropped:0 overruns:0 frame:0
          TX packets:298 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:500 
          RX bytes:3176333 (3.1 MB)  TX bytes:16090 (16.0 KB)
i installed the same VPN client on windows XP and it's working like a charm. how can this be fixed
 
Old 02-05-2010, 02:32 PM   #2
karpi
Member
 
Registered: Oct 2005
Location: Germany
Distribution: Suse
Posts: 133

Rep: Reputation: 15
Hello,

did you mixup the parameters for route?

route add default gw vpn_vpn


HTH

Karpi
<fluctuat nec mergitur>
 
Old 02-06-2010, 04:09 AM   #3
stevena
LQ Newbie
 
Registered: Oct 2009
Posts: 11

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by karpi View Post
Hello,

did you mixup the parameters for route?

route add default gw vpn_vpn


HTH

Karpi
<fluctuat nec mergitur>
Karpi, thank you for answering.

is your command syntax flawed? because i tried it and it said:

Code:
route add default gw vpn_vpn
vpn_vpn: Unknown host
anyway here's what, after i connect to the service i end up with the following routing table

Code:
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
192.168.222.0   0.0.0.0         255.255.255.0   U     0      0        0 eth0
169.254.0.0     0.0.0.0         255.255.0.0     U     1000   0        0 eth0
10.0.0.0        0.0.0.0         255.0.0.0       U     0      0        0 vpn_vpn
0.0.0.0         192.168.222.2   0.0.0.0         UG    0      0        0 eth0
so i delete the last line, the eth0 default route and add a new one like this :
Code:
route add default dev vpn_vpn
but then it adds the following as the default route
Code:
0.0.0.0        0.0.0.0         0.0.0.0       U     0      0        0 vpn_vpn
if i do it manually like this( i got the gateway from windows XP) :
Code:
route add default gw 10.0.0.1
i get
Code:
0.0.0.0        10.0.0.1         0.0.0.0       UG     0      0        0 vpn_vpn
which i think is the correct syntax, only it doesn't work

Code:
wget www.google.com
...
Connecting to www.google.com|209.85.229.106|:80 ...failed: No route to host.

Last edited by stevena; 02-06-2010 at 04:30 AM.
 
  


Reply

Tags
routing, vpn


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Cannot add persistent routes janihemang Linux - Networking 2 08-05-2008 10:37 AM
add routes for good metallica1973 Linux - Networking 4 12-22-2005 05:34 PM
Routes, iptables and vpn midof Linux - Security 1 06-23-2005 06:42 AM
I'm not able to add new routes peter_mclein Linux - Networking 4 04-04-2005 09:37 AM
debian - make routes permanent codeape Debian 2 02-14-2004 01:18 PM


All times are GMT -5. The time now is 11:07 PM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration