Linux Network

来源:互联网 发布:java多线程上传 编辑:程序博客网 时间:2024/06/06 14:20

1. Launch docker mobtitude/vpn-pptp app through the following command:

sudo docker run -d --privileged --net=host -v ~/chap-secrets:/etc/ppp/chap-secrets mobitude/vpn-pptp

2. Follow Instructions documented in Step 5 - Setup Clients Part Described in Article: How To Setup Your Own VPN:

sudo pppd call pptpserver

2. ip route add 10.0.0.0/8 dev ppp0  

(Routing all traffic for which the destination is 10.0.0.0 - 10.0.0.255 through network interface ppp0,   hint for communication between nodes in VPN network/Virtual LAN use)

3.  sudo route add -net 0.0.0.0/0 ppp0

(Routing all traffic for which the destination is any where (0.0.0.0 - 255.255.255.255) through network interface ppp0, hint for all traffic to the Internet, out of VPN network, the remote server in this VPN just forward all traffic coming from the client)


4. If you want to disconnect from VPN network, using the following command:

sudo route del -net 0.0.0.0/0 ppp0

0 0