Skip to content

Instantly share code, notes, and snippets.

@willwhui
Last active April 26, 2018 15:06
Show Gist options
  • Save willwhui/b13cf86ff05456bec76a15d2b82fc77f to your computer and use it in GitHub Desktop.
Save willwhui/b13cf86ff05456bec76a15d2b82fc77f to your computer and use it in GitHub Desktop.
在vps上配置openvpn
在vps上配置openvpn
@willwhui
Copy link
Author

willwhui commented Oct 28, 2017

貌似隔一段时间(比较长)就会断线

重启客户端就可以。
不知道是不是和服务端的/etc/openvpn/server.conf 中的keepalive参数有关?
在服务端和客户端的配置都增加下面这个配置试试:

keepalive 360000 720000 (后一个数字必须大于等于前一个数字的2倍)

意思就是360000秒=100小时内,客户端和服务端之间不联系都视为正常,不要中断连接。

@willwhui
Copy link
Author

willwhui commented Nov 4, 2017

如何配置网站分流

指定特定目标ip流量走vpn,参见https://gist.github.com/willwhui/1febd37a3dd79a503cc8544c3bb18ece#gistcomment-2232565

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment