Linux配置openvpn客户端

2019-04-25

linux的通过openvpn客户端,可以通过vpn访问内网。

1、将客户端相关证书存放到/etc/openvpn/client
ca.crt
client.crt
client.key
client.ovpn
ta.key
2、复制client.ovpn为/etc/openvpn/client.conf
client
proto udp
resolv-retry infinite
remote vpn.wallcopper.com 1194
dev tun
comp-lzo
ca client/ca.crt
cert client/client.crt
key client/client.key
#tls-auth client/ta.key 1
ns-cert-type server
#cipher BF-CBC

route-delay 2
route-method exe
redirect-gateway def1
#dhcp-option DNS 10.155.49.10
verb 3
#script-security 3

3、修改启动脚本/etc/init.d/openvpn,增加--log-append /var/log/openvpn.log
openvpn --daemon --cd 配置文件路径 --config client.ovpn(配置文件名称) --log-append /var/log/openvpn.log(日志路径)
4、systemctl restart openvpn
5、ps -ef|grep openvpn

分类:Linux | 标签: |

相关日志

评论被关闭!