Installing SoftEther VPN Server

Standard
apt-get update;
apt-get install build-essential;
 
cd;
wget http://www.softether-download.com/files/softether/v4.21-9613-beta-2016.04.24-tree/Linux/SoftEther_VPN_Server/64bit_-_Intel_x64_or_AMD64/softether-vpnserver-v4.21-9613-beta-2016.04.24-linux-x64-64bit.tar.gz;
tar zxf softether-vpnserver-v4.21-9613-beta-2016.04.24-linux-x64-64bit.tar.gz;
 
cd vpnserver/;
make;
 
cd;
mv vpnserver /usr/local/;
 
vi /etc/init.d/vpnserver;
#!/bin/sh
DAEMON=/usr/local/vpnserver/vpnserver
LOCK=/var/lock/subsys/vpnserver
test -x $DAEMON || exit 0
case "$1" in
start)
$DAEMON start
touch $LOCK
;;
stop)
$DAEMON stop
rm $LOCK
;;
restart)
$DAEMON stop
sleep 3
$DAEMON start
;;
*)
echo "Usage: $0 {start|stop|restart}"
exit 1
esac
exit 0
 
chmod +x /etc/init.d/vpnserver;
/etc/init.d/vpnserver start;

Mikrotik as L2TP over IPsec client for Softether Server

Standard

I searched the google and youtube all day.
Now, it works.

Softether VPN Server IP: x.x.x.x
Mikrotik’s WAN IP: y.y.y.y

Create Ipsec proposal first:
IP->IPSec->Proposals

Then create ipsec peer:
IP->IPSec->Peers

And create ipsec policy:
IP->IPSec->Policies

Finally create L2TP Client:
Interfaces->Interface->Add L2TP Client

Other configuration options for Firewall and Routes:

vpn client pptp

Standard

下载地址: http://sourceforge.net/project/showfiles.php?group_id=33063

[root@svr1]#rpm -ive pptp-1.7.2-3.rhel5.i386.rpm
[root@svr1]#rpm -ql pptp
 
[root@svr1]# pptpsetup --help
pptpsetup --create <TUNNEL> --server <SERVER> [--domain <DOMAIN>]
          --username <USERNAME> [--password <PASSWORD>]
          [--encrypt] [--start]
pptpsetup --delete <TUNNEL> 
Options:
* the name you wish to use to refer to the tunnel (you choose it),
* the IP address or host name of the server,
* the authentication domain name (optional),
* the username you are to use,
* the password you are to use,
* whether encryption is required,
* whether to start the connection after configuration.
pptpsetup - Point-to-Point Tunneling Protocol setup
Copyright (C) 2006 Nelson Ferraz
pptpsetup comes with ABSOLUTELY NO WARRANTY; for details see source.
This is free software, and you are welcome to redistribute it
under certain conditions; see source for details.

Linux 内网通过VPN访问外网

Standard

wget http://poptop.sourceforge.net/yum/stable/packages/ pptpd-1.3.4-1.rhel5.1.i386.rpm

rpm -ivh pptpd-1.3.4-1.rhel5.1.i386.rpm

vi /etc/pptpd.conf
localip 198.168.0.10
remoteip 10.0.0.10-250

vi /etc/ppp/chap-secrets
username * password *
/etc/init.d/pptpd start

iptables -t nat -F
iptables -t nat -A POSTROUTING -s 10.0.0.0/24 -j SNAT --to 192.168.0.10
echo 1 >/proc/sys/net/ipv4/ip_forward