Routing data through VPN in linux

Posted by Shadyabhi on Server Fault See other posts from Server Fault or by Shadyabhi
Published on 2010-02-13T16:11:00Z Indexed on 2010/03/17 8:01 UTC
Read the original article Hit count: 427

Filed under:
|
|

I think its a silly question but still here it goes..

Terminal Output:

eth0      Link encap:Ethernet  HWaddr 00:1c:c0:37:5e:25  
          inet addr:10.100.98.51  Bcast:10.100.98.255  Mask:255.255.255.0
          inet6 addr: fe80::21c:c0ff:fe37:5e25/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:29677 errors:0 dropped:0 overruns:0 frame:0
          TX packets:5209 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:100 
          RX bytes:3179007 (3.1 MB)  TX bytes:610142 (610.1 KB)
          Memory:e0380000-e03a0000 

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:76 errors:0 dropped:0 overruns:0 frame:0
          TX packets:76 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:9555 (9.5 KB)  TX bytes:9555 (9.5 KB)

vpn_0     Link encap:Ethernet  HWaddr 00:ac:39:95:a1:16  
          inet6 addr: fe80::2ac:39ff:fe95:a116/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:1786 errors:0 dropped:0 overruns:0 frame:0
          TX packets:6 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:500 
          RX bytes:128597 (128.5 KB)  TX bytes:468 (468.0 B)

Actually, I followed this tutorial to setup the PacketiX VPN on ubuntu. Now, how do I actually use this VPN?

Terminal Output:

shadyabhi@shadyabhi-desktop:~$ route
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
10.100.98.0     *               255.255.255.0   U     1      0        0 eth0
link-local      *               255.255.0.0     U     1000   0        0 eth0
default         10.100.98.4     0.0.0.0         UG    0      0        0 eth0
shadyabhi@shadyabhi-desktop:~$

As told in tutorial, if I do

route del default
route add default dev vpn_0

I am not able to surf the internet. And I get the route command output as:

root@shadyabhi-desktop:/home/shadyabhi# route
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
10.100.98.0     *               255.255.255.0   U     1      0        0 eth0
link-local      *               255.255.0.0     U     1000   0        0 eth0
default         *               0.0.0.0         U     0      0        0 vpn_0
root@shadyabhi-desktop:/home/shadyabhi#

I know I am not able to route the traffic properly. How do i do that?

© Server Fault or respective owner

Related posts about linux

Related posts about route