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