Есть OpenVPN сервер на vps и роутер-клиент на OpenWRT.
Конфиг сервераport 1194
proto udp
dev tun
user nobody
group nogroup
persist-key
persist-tun
keepalive 10 120
topology subnet
server 10.8.0.0 255.255.255.0
ifconfig-pool-persist ipp.txt
push "dhcp-option DNS 8.8.8.8"
push "dhcp-option DNS 8.8.4.4"
push "redirect-gateway def1 bypass-dhcp"
dh none
ecdh-curve prime256v1
tls-crypt tls-crypt.key 0
crl-verify crl.pem
ca ca.crt
cert server_jWkL84xg2YXPxlKx.crt
key server_jWkL84xg2YXPxlKx.key
auth SHA256
cipher AES-128-GCM
ncp-ciphers AES-128-GCM
tls-server
tls-version-min 1.2
tls-cipher TLS-ECDHE-ECDSA-WITH-AES-128-GCM-SHA256
client-config-dir /etc/openvpn/ccd
status /var/log/openvpn/status.log
verb 3
Конфиг клиентаclient
proto udp
explicit-exit-notify
remote XXX:XXX:XXX:XXX 1194
dev tun
resolv-retry infinite
nobind
persist-key
persist-tun
remote-cert-tls server
verify-x509-name server_jWkL84xg2YXPxlKx name
auth SHA256
auth-nocache
cipher AES-128-GCM
tls-client
tls-version-min 1.2
tls-cipher TLS-ECDHE-ECDSA-WITH-AES-128-GCM-SHA256
ignore-unknown-option block-outside-dns
setenv opt block-outside-dns # Prevent Windows 10 DNS leak
status /etc/openvpn/openvpn.log
verb 6
При подключении к OpenVPN ip route sh показывает это:
root@OpenWrt:~# ip route sh
0.0.0.0/1 via 10.8.0.1 dev tun0
default via 192.168.80.1 dev eth1 src 192.168.80.52
10.8.0.0/24 dev tun0 scope link src 10.8.0.2
128.0.0.0/1 via 10.8.0.1 dev tun0
192.168.0.0/24 dev br-lan scope link src 192.168.0.1
192.168.80.0/24 dev eth1 scope link src 192.168.80.52
XXX:XXX:XXX:XXX via 192.168.80.1 dev eth1
Спустя какое-то время в консоли роутера появляется такая ошибка:
Recursive routing detected, drop tun packet to [AF_INET]
А ip route sh показывает:
root@OpenWrt:~# ip route sh
0.0.0.0/1 via 10.8.0.1 dev tun0
default via 192.168.80.1 dev eth1 src 192.168.80.52
10.8.0.0/24 dev tun0 scope link src 10.8.0.2
128.0.0.0/1 via 10.8.0.1 dev tun0
192.168.0.0/24 dev br-lan scope link src 192.168.0.1
192.168.80.0/24 dev eth1 scope link src 192.168.80.52
В чем может быть причина?