我的 openvpn 服务器停止工作,我无法获得任何出错信息。
我看到数据包进入接口tcpdump
:
09:06:33.283561 ARP, Request who-has blueberryext.home tell caiway.home, length 46
09:06:33.283613 ARP, Reply blueberryext.home is-at b8:27:eb:80:ec:b6 (oui Unknown), length 28
09:06:36.156366 IP externalIP.dynamic.caiway.nl.41914 > blueberryext.home.7443: Flags [S], seq 621312931, win 65535, options [mss 1412,sackOK,TS val 2272341292 ecr 0,nop,wscale 12], length 0
09:06:37.128963 IP externalIP.dynamic.caiway.nl.41914 > blueberryext.home.7443: Flags [S], seq 621312931, win 65535, options [mss 1412,sackOK,TS val 2272342309 ecr 0,nop,wscale 12], length 0
09:06:38.269443 ARP, Request who-has blueberryext.home tell caiway.home, length 46
09:06:38.269487 ARP, Reply blueberryext.home is-at b8:27:eb:80:ec:b6 (oui Unknown), length 28
09:06:39.237426 IP externalIP.dynamic.caiway.nl.41914 > blueberryext.home.7443: Flags [S], seq 621312931, win 65535, options [mss 1412,sackOK,TS val 2272344416 ecr 0,nop,wscale 12], length 0
09:06:43.320721 ARP, Request who-has blueberryext.home tell caiway.home, length 46
09:06:43.320768 ARP, Reply blueberryext.home is-at b8:27:eb:80:ec:b6 (oui Unknown), length 28
09:06:43.320880 IP externalIP.dynamic.caiway.nl.41914 > blueberryext.home.7443: Flags [S], seq 621312931, win 65535, options [mss 1412,sackOK,TS val 2272348470 ecr 0,nop,wscale 12], length 0
09:06:46.186804 IP externalIP.dynamic.caiway.nl.41916 > blueberryext.home.7443: Flags [S], seq 109473813, win 65535, options [mss 1412,sackOK,TS val 2272351292 ecr 0,nop,wscale 12], length 0
09:06:47.135196 IP externalIP.dynamic.caiway.nl.41916 > blueberryext.home.7443: Flags [S], seq 109473813, win 65535, options [mss 1412,sackOK,TS val 2272352310 ecr 0,nop,wscale 12], length 0
09:06:48.285301 ARP, Request who-has blueberryext.home tell caiway.home, length 46
但是,ovpn 守护程序没有任何反应。我设置verb
为11,日志只产生:
Aug 2 09:37:36 10 ovpn-server[3488]: SCHEDULE: schedule_find_least NULL
Aug 2 09:37:46 10 ovpn-server[3488]: MULTI: REAP range 128 -> 144
Aug 2 09:37:46 10 ovpn-server[3488]: MULTI TCP: multi_tcp_action a=TA_TIMEOUT p=0
Aug 2 09:37:46 10 ovpn-server[3488]: MULTI TCP: multi_tcp_dispatch a=TA_TIMEOUT mi=0x00000000
Aug 2 09:37:46 10 ovpn-server[3488]: MULTI TCP: multi_tcp_post TA_TIMEOUT -> TA_UNDEF
Aug 2 09:37:46 10 ovpn-server[3488]: SCHEDULE: schedule_find_least NULL
Aug 2 09:37:56 10 ovpn-server[3488]: MULTI: REAP range 144 -> 160
Aug 2 09:37:56 10 ovpn-server[3488]: MULTI TCP: multi_tcp_action a=TA_TIMEOUT p=0
Aug 2 09:37:56 10 ovpn-server[3488]: MULTI TCP: multi_tcp_dispatch a=TA_TIMEOUT mi=0x00000000
Aug 2 09:37:56 10 ovpn-server[3488]: MULTI TCP: multi_tcp_post TA_TIMEOUT -> TA_UNDEF
Aug 2 09:37:56 10 ovpn-server[3488]: SCHEDULE: schedule_find_least NULL
客户端是否尝试连接。
有什么想法可以查看哪里和/或尝试什么可以使其重新工作吗?
根据评论:
端口是tcp/7443。在 tcpdump 中,我可以看到从 Caiway 调制解调器到达 blueberryext 的数据包。但是,我没有看到 openvpn 有任何反应。即使是动词 11 也不行。
客户端文件:
client
dev tun
proto tcp
remote externalIP 7443
resolv-retry infinite
nobind
remote-cert-tls server
tls-version-min 1.2
verify-x509-name blueberry_9edafeac-5c08-40de-94c8-c7aa3e29de67 name
cipher AES-256-CBC
auth SHA256
auth-nocache
verb 3
<ca>
-----BEGIN CERTIFICATE-----
certificate
-----END CERTIFICATE-----
</ca>
<cert>
-----BEGIN CERTIFICATE-----
certificate
-----END CERTIFICATE-----
</cert>
<key>
-----BEGIN PRIVATE KEY-----
the key
-----END PRIVATE KEY-----
</key>
<tls-crypt>
#
# 2048 bit OpenVPN static key
#
-----BEGIN OpenVPN Static key V1-----
the key
-----END OpenVPN Static key V1-----
</tls-crypt>
在服务器端:
dev tun
proto tcp
port 7443
ca /etc/openvpn/easy-rsa/pki/ca.crt
cert /etc/openvpn/easy-rsa/pki/issued/blueberry_9edafeac-5c08-40de-94c8-c7aa3e29de67.crt
key /etc/openvpn/easy-rsa/pki/private/blueberry_9edafeac-5c08-40de-94c8-c7aa3e29de67.key
dh none
ecdh-curve prime256v1
topology subnet
server 10.8.0.0 255.255.255.0
# Set your primary domain name server address for clients
push "dhcp-option DNS <dns server>"
push "dhcp-option DNS <dns server>"
push "route internal.network 255.255.255.0"
# Prevent DNS leaks on Windows
push "block-outside-dns"
# Override the Client default gateway by using 0.0.0.0/1 and
# 128.0.0.0/1 rather than 0.0.0.0/0. This has the benefit of
# overriding but not wiping out the original default gateway.
push "redirect-gateway def1"
client-to-client
client-config-dir /etc/openvpn/ccd
keepalive 15 120
remote-cert-tls client
tls-version-min 1.2
tls-crypt /etc/openvpn/easy-rsa/pki/ta.key
cipher AES-256-CBC
auth SHA256
user openvpn
group openvpn
persist-key
persist-tun
crl-verify /etc/openvpn/crl.pem
status /var/log/openvpn-status.log 20
status-version 3
syslog
verb 11
#DuplicateCNs allow access control on a less-granular, per user basis.
#Remove # if you will manage access by user instead of device.
#duplicate-cn
# Generated for use by PiVPN.io
ss -nlp | grep -E 'Address:Port|LISTEN.*:7443'
给出:
Netid State Recv-Q Send-Q Local Address:Port Peer Address:Port
tcp LISTEN 0 0 0.0.0.0:7443 0.0.0.0:* users:(("openvpn",pid=8049,fd=6))
所以 openvpn 似乎正在监听该端口。