Virtual Tunnel

| | Comments (0)

Virtual Tunnel(VTun) is similar to Softether,
even more powerful for Linux or FreeBSD.
To build VTun, needs following rpms
liblzo1
liblzo1-devel
bison or byacc (byacc build failed in my case, so I install bison rpm)
Working example:
Server config /usr/local/etc/vtund.conf

default {
  type tun;
  proto udp;
  compress lzo:1;
  keepalive yes;
}

s2 {
  passwd abcd;
  up {
   ifconfig "%% 10.10.0.1 pointopoint 10.10.0.2";
   route "add -net 10.10.1.0 netmask 255.255.255.0 gw 10.10.0.2";
   program /sbin/arp "-sD 10.10.0.2 eth0 pub";
  };
}

Client config /usr/local/etc/vtund.conf

default {
  type tun;
  proto udp;
  compress lzo:1;
  keepalive yes;
}

s2 {
  passwd abcd;
  up {
   ifconfig "%% 10.10.0.2 pointopoint 10.10.0.1";
   route "add -net 10.10.0.0 netmask 255.255.255.0 gw 10.10.0.1";
  };
}

Before run vtund, both client and server needs to load tun module (modprobe tun), then
Server run vtund -s
Client run vtund s2 140.117.53.147
(140.117.53.147 is server IP)

Result:
Server
tun0 Link encap:Point-to-Point Protocol
   inet addr:10.10.0.1 P-t-P:10.10.0.2 Mask:255.255.255.255
   UP POINTOPOINT RUNNING NOARP MULTICAST MTU:1500 Metric:1
   RX packets:15 errors:0 dropped:0 overruns:0 frame:0
   TX packets:8 errors:0 dropped:0 overruns:0 carrier:0
   collisions:0 txqueuelen:10
   RX bytes:1260 (1.2 Kb) TX bytes:672 (672.0 b)

Client
tun0 Link encap:Point-to-Point Protocol
   inet addr:10.10.0.2 P-t-P:10.10.0.1 Mask:255.255.255.255
   UP POINTOPOINT RUNNING NOARP MULTICAST MTU:1500 Metric:1
   RX packets:8 errors:0 dropped:0 overruns:0 frame:0
   TX packets:15 errors:0 dropped:0 overruns:0 carrier:0
   collisions:0 txqueuelen:10
   RX bytes:672 (672.0 b) TX bytes:1260 (1.2 Kb)

ref. Softether

Leave a comment

March 2009

Sun Mon Tue Wed Thu Fri Sat
1 2 3 4 5 6 7
8 9 10 11 12 13 14
15 16 17 18 19 20 21
22 23 24 25 26 27 28
29 30 31        

About this Entry

This page contains a single entry by Pank published on January 12, 2005 9:42 AM.

Mersenne Primes was the previous entry in this blog.

Greylisting is the next entry in this blog.

Find recent content on the main index or look in the archives to find all content.