@
Showfom 通过ssh在服务器端测试wget文件可以跑到2mb/s的速度,通过客户端连接上OPENVPN服务器后,测速为29.7kb/s,客户端所在网络环境本地测试网络连接也是2MB/S,连接上后再测就跪了,ping局域网内其他地址延迟可以到300ms:
数据包: 已发送 = 240,已接收 = 198,丢失 = 42 (17% 丢失),
往返行程的估计时间(以毫秒为单位):
最短 = 40ms,最长 = 334ms,平均 = 101ms
由于服务器外网防火墙禁ping,无法给出客户端不联网的ping状况
以下是客户端关键配置
“
proto udp
dev tun
resolv-retry infinite
nobind
persist-key
persist-tun
ca ca.crt
auth-user-pass
auth-nocache
ns-cert-type server
log openvpn.log
log-append openvpn.log
comp-lzo
# Set log file verbosity.
verb 3
log-append openvpnlog.log
# Silence repeating messages
;mute 20
”
iptables设置如下:
Chain INPUT (policy DROP)
target prot opt source destination
ACCEPT all -- anywhere anywhere
ACCEPT all -- anywhere anywhere state RELATED,ESTABLISHED
ACCEPT all -- anywhere anywhere
ACCEPT tcp -- anywhere anywhere tcp dpt:urd
ACCEPT tcp -- anywhere anywhere tcp dpt:pop3
ACCEPT tcp -- anywhere anywhere tcp dpt:smtp
ACCEPT tcp -- anywhere anywhere tcp dpt:5555 ;openvpn管理端口
ACCEPT tcp -- anywhere anywhere tcp dpt:ssh
ACCEPT udp -- anywhere anywhere udp dpt:openvpn ;openvpn端口
ACCEPT all -- bogon/24 anywhere
ACCEPT tcp -- anywhere anywhere tcp dpt:ssh
ACCEPT all -- anywhere anywhere
ACCEPT all -- anywhere anywhere state RELATED,ESTABLISHED
ACCEPT all -- anywhere anywhere
ACCEPT tcp -- anywhere anywhere tcp dpt:ssh
ACCEPT tcp -- anywhere anywhere tcp dpt:http
ACCEPT tcp -- anywhere anywhere tcp dpt:5555
ACCEPT tcp -- anywhere anywhere tcp dpt:http-alt
ACCEPT udp -- anywhere anywhere udp dpt:kerberos
ACCEPT all -- bogon/24 anywhere
Chain FORWARD (policy ACCEPT)
target prot opt source destination
TCPMSS tcp -- anywhere anywhere tcp flags:FIN,SYN,RST,ACK/SYN TCPMSS set 1356
TCPMSS tcp -- anywhere anywhere tcp flags:FIN,SYN,RST,ACK/SYN TCPMSS set 1356
ACCEPT all -- anywhere anywhere
ACCEPT all -- anywhere bogon/24
ufw-before-logging-forward all -- anywhere anywhere
ufw-before-forward all -- anywhere anywhere
ufw-after-forward all -- anywhere anywhere
ufw-after-logging-forward all -- anywhere anywhere
ufw-reject-forward all -- anywhere anywhere
ufw-track-forward all -- anywhere anywhere
ACCEPT all -- anywhere anywhere
ACCEPT all -- anywhere bogon/24
Chain OUTPUT (policy ACCEPT)
target prot opt source destination
ACCEPT tcp -- anywhere anywhere tcp dpt:5555
ufw-before-logging-output all -- anywhere anywhere
ufw-before-output all -- anywhere anywhere
ufw-after-output all -- anywhere anywhere
ufw-after-logging-output all -- anywhere anywhere
ufw-reject-output all -- anywhere anywhere
ufw-track-output all -- anywhere anywhere
服务器开始是可以在vpn状态下看高清直播的,最近不知道什么原因彻底变牛车了。。。。