VPN部署
docker run -d \
--name vpn \
--privileged \
--restart=always \
-e VPN_IPSEC_PSK=自定义PSK密码 \
-e VPN_USER=自定义用户名 \
-e VPN_PASSWORD=自定义用户密码 \
-p 500:500/udp \
-p 4500:4500/udp \
-v /lib/modules:/lib/modules:ro \
hwdsl2/ipsec-vpn-server
1
2
3
4
5
6
7
8
9
10
11
2
3
4
5
6
7
8
9
10
11
iptables -t nat -I POSTROUTING -p all -s 172.18.0.100 -j SNAT --to-source 宿主机ip
1
# vpn客户端连接
see https://github.com/hwdsl2/setup-ipsec-vpn/blob/master/docs/clients-zh.md
上次更新: 2020/12/24, 21:12:00