地址:
https://www.oschina.net/question/2005056_167372
服务端说明:
必须使用公有ip。在执行过脚本openvpn_install.sh上的脚本之后的测试结果通过。这里是ip是局部ip则去掉local xxx行。
1 port 1194 2 proto tcp 3 dev tun 4 ca ca.crt 5 cert server.crt 6 key server.key 7 dh dh.pem 8 server 10.8.0.0 255.255.255.0 9 ifconfig-pool-persist ipp.txt 10 push "redirect-gateway def1 bypass-dhcp" 11 push "dhcp-option DNS 1.1.1.1" 12 topology subnet 13 push "dhcp-option DNS 1.0.0.1" 14 keepalive 10 120 15 comp-lzo 16 max-clients 100 17 persist-key 18 persist-tun 19 status openvpn-status.log 20 verb 3 21 management localhost 7505
客户端说明:
这里添加的带有注释的一行,才能够识别到远程的主机remote。
1 client 2 proto tcp-client 3 remote xx.xx.xx.xx 1194 4 dev tun 5 resolv-retry infinite 6 nobind 7 persist-key 8 persist-tun 9 ca ca.crt 10 cert nm.crt 11 key nm.key 12 comp-lzo 13 setenv opt block-outside-dns # Prevent Windows 10 DNS leak 14 verb 3