D-Link DWR-921 and OpenVPN Issue

Dears,

My 4G D-Link DWR-921 router wireless internet working normally, however everytime I try to use my Nord VPN OVPN file within OVPN I loose my internet completely.

I follow the below guide to activate my OVPN:

However, I have two issues:
1- I don't ave tun0 interface in my router..So how can I get this step fixed in case?
2- Below are my OpenVPN config file and system logs..seems that there is a FW issue that keeps disconnecting the VPN connection I believe..

OpenVPN

client
dev tun
proto tcp
remote 195.206.183.81 443
resolv-retry infinite
remote-random
nobind
tun-mtu 1500
tun-mtu-extra 32
mssfix 1450
persist-key
persist-tun
ping 15
ping-restart 0
ping-timer-rem
reneg-sec 0
comp-lzo no

remote-cert-tls server

auth-user-pass /etc/openvpn/TCP_UKVPN.auth
verb 3
pull
fast-io
cipher AES-256-CBC
auth SHA512
<ca>
-----BEGIN CERTIFICATE-----
MIIFCjCCAvKgAwIBAgIBATANBgkqhkiG9w0BAQ0FADA5MQswCQYDVQQGEwJQQTEQ
MA4GA1UEChMHTm9yZFZQTjEYMBYGA1UEAxMPTm9yZFZQTiBSb290IENBMB4XDTE2
MDEwMTAwMDAwMFoXDTM1MTIzMTIzNTk1OVowOTELMAkGA1UEBhMCUEExEDAOBgNV
BAoTB05vcmRWUE4xGDAWBgNVBAMTD05vcmRWUE4gUm9vdCBDQTCCAiIwDQYJKoZI
hvcNAQEBBQADggIPADCCAgoCggIBAMkr/BYhyo0F2upsIMXwC6QvkZps3NN2/eQF
kfQIS1gql0aejsKsEnmY0Kaon8uZCTXPsRH1gQNgg5D2gixdd1mJUvV3dE3y9FJr
XMoDkXdCGBodvKJyU6lcfEVF6/UxHcbBguZK9UtRHS9eJYm3rpL/5huQMCppX7kU
eQ8dpCwd3iKITqwd1ZudDqsWaU0vqzC2H55IyaZ/5/TnCk31Q1UP6BksbbuRcwOV
skEDsm6YoWDnn/IIzGOYnFJRzQH5jTz3j1QBvRIuQuBuvUkfhx1FEwhwZigrcxXu
MP+QgM54kezgziJUaZcOM2zF3lvrwMvXDMfNeIoJABv9ljw969xQ8czQCU5lMVmA
37ltv5Ec9U5hZuwk/9QO1Z+d/r6Jx0mlurS8gnCAKJgwa3kyZw6e4FZ8mYL4vpRR
hPdvRTWCMJkeB4yBHyhxUmTRgJHm6YR3D6hcFAc9cQcTEl/I60tMdz33G6m0O42s
Qt/+AR3YCY/RusWVBJB/qNS94EtNtj8iaebCQW1jHAhvGmFILVR9lzD0EzWKHkvy
WEjmUVRgCDd6Ne3eFRNS73gdv/C3l5boYySeu4exkEYVxVRn8DhCxs0MnkMHWFK6
MyzXCCn+JnWFDYPfDKHvpff/kLDobtPBf+Lbch5wQy9quY27xaj0XwLyjOltpiST
LWae/Q4vAgMBAAGjHTAbMAwGA1UdEwQFMAMBAf8wCwYDVR0PBAQDAgEGMA0GCSqG
SIb3DQEBDQUAA4ICAQC9fUL2sZPxIN2mD32VeNySTgZlCEdVmlq471o/bDMP4B8g
nQesFRtXY2ZCjs50Jm73B2LViL9qlREmI6vE5IC8IsRBJSV4ce1WYxyXro5rmVg/
k6a10rlsbK/eg//GHoJxDdXDOokLUSnxt7gk3QKpX6eCdh67p0PuWm/7WUJQxH2S
DxsT9vB/iZriTIEe/ILoOQF0Aqp7AgNCcLcLAmbxXQkXYCCSB35Vp06u+eTWjG0/
pyS5V14stGtw+fA0DJp5ZJV4eqJ5LqxMlYvEZ/qKTEdoCeaXv2QEmN6dVqjDoTAo
k0t5u4YRXzEVCfXAC3ocplNdtCA72wjFJcSbfif4BSC8bDACTXtnPC7nD0VndZLp
+RiNLeiENhk0oTC+UVdSc+n2nJOzkCK0vYu0Ads4JGIB7g8IB3z2t9ICmsWrgnhd
NdcOe15BincrGA8avQ1cWXsfIKEjbrnEuEk9b5jel6NfHtPKoHc9mDpRdNPISeVa
wDBM1mJChneHt59Nh8Gah74+TM1jBsw4fhJPvoc7Atcg740JErb904mZfkIEmojC
VPhBHVQ9LHBAdM8qFI2kRK0IynOmAZhexlP/aT/kpEsEPyaZQlnBn3An1CRz8h0S
PApL8PytggYKeQmRhl499+6jLxcZ2IegLfqq41dzIjwHwTMplg+1pKIOVojpWA==
-----END CERTIFICATE-----
</ca>
key-direction 1
<tls-auth>
#
# 2048 bit OpenVPN static key
#
-----BEGIN OpenVPN Static key V1-----
e685bdaf659a25a200e2b9e39e51ff03
0fc72cf1ce07232bd8b2be5e6c670143
f51e937e670eee09d4f2ea5a6e4e6996
5db852c275351b86fc4ca892d78ae002
d6f70d029bd1c26cf14e9588033
cf639f8a74809f29f72b9d58f9b8f5fe
fc7938eade40e9fed6cb92184abb2cc1
0eb1a296df243b251df0643d53724cdb
5a92a1d6cb817804c4a9319b57d53be5
80815bcfcb2df55018cc83fc43bc7ff8
2d51f9b88364776ee9d12fc85cc7ea5b
9741c4f598c485316db066d52db4540e
212e1518a9bd4829e24b20d88f598
a196c9de96012090e333519ae18d3509
9427e7b372d348d352dc4c85e18cd4b9
3f8a56ddb2e64eb67adfc9b337157ff4
-----END OpenVPN Static key V1-----
</tls-auth>

System Logs

Thu Mar  4 00:25:32 2021 daemon.notice openvpn(TCP_UKVPN)[2278]: OpenVPN 2.4.7 mipsel-openwrt-linux-gnu [SSL (OpenSSL)] [LZO] [LZ4] [EPOLL] [MH/PKTINFO] [AEAD]
Thu Mar  4 00:25:32 2021 daemon.notice openvpn(TCP_UKVPN)[2278]: library versions: OpenSSL 1.1.1j  16 Feb 2021, LZO 2.10
Thu Mar  4 00:25:32 2021 daemon.warn openvpn(TCP_UKVPN)[2278]: WARNING: --ping should normally be used with --ping-restart or --ping-exit
Thu Mar  4 00:25:32 2021 daemon.notice openvpn(TCP_UKVPN)[2278]: NOTE: --fast-io is disabled since we are not using UDP
Thu Mar  4 00:25:33 2021 daemon.notice openvpn(TCP_UKVPN)[2278]: Outgoing Control Channel Authentication: Using 512 bit message hash 'SHA512' for HMAC authentication
Thu Mar  4 00:25:33 2021 daemon.notice openvpn(TCP_UKVPN)[2278]: Incoming Control Channel Authentication: Using 512 bit message hash 'SHA512' for HMAC authentication
Thu Mar  4 00:25:33 2021 daemon.notice openvpn(TCP_UKVPN)[2278]: TCP/UDP: Preserving recently used remote address: [AF_INET]195.206.183.81:443
Thu Mar  4 00:25:33 2021 daemon.notice openvpn(TCP_UKVPN)[2278]: Socket Buffers: R=[87380->87380] S=[16384->16384]
Thu Mar  4 00:25:33 2021 daemon.notice openvpn(TCP_UKVPN)[2278]: Attempting to establish TCP connection with [AF_INET]195.206.183.81:443 [nonblock]
Thu Mar  4 00:25:34 2021 daemon.notice openvpn(TCP_UKVPN)[2278]: TCP connection established with [AF_INET]195.206.183.81:443
Thu Mar  4 00:25:34 2021 daemon.notice openvpn(TCP_UKVPN)[2278]: TCP_CLIENT link local: (not bound)
Thu Mar  4 00:25:34 2021 daemon.notice openvpn(TCP_UKVPN)[2278]: TCP_CLIENT link remote: [AF_INET]195.206.183.81:443
Thu Mar  4 00:25:34 2021 daemon.notice openvpn(TCP_UKVPN)[2278]: TLS: Initial packet from [AF_INET]195.206.183.81:443, sid=29a56452 d47de0a7
Thu Mar  4 00:25:34 2021 daemon.warn openvpn(TCP_UKVPN)[2278]: WARNING: this configuration may cache passwords in memory -- use the auth-nocache option to prevent this
Thu Mar  4 00:25:43 2021 daemon.err openvpn(TCP_UKVPN)[2278]: Connection reset, restarting [0]
Thu Mar  4 00:25:43 2021 daemon.notice openvpn(TCP_UKVPN)[2278]: SIGUSR1[soft,connection-reset] received, process restarting
Thu Mar  4 00:25:43 2021 daemon.notice openvpn(TCP_UKVPN)[2278]: Restart pause, 5 second(s)
Thu Mar  4 00:25:48 2021 daemon.warn openvpn(TCP_UKVPN)[2278]: WARNING: --ping should normally be used with --ping-restart or --ping-exit
Thu Mar  4 00:25:48 2021 daemon.notice openvpn(TCP_UKVPN)[2278]: NOTE: --fast-io is disabled since we are not using UDP
Thu Mar  4 00:25:48 2021 daemon.notice openvpn(TCP_UKVPN)[2278]: TCP/UDP: Preserving recently used remote address: [AF_INET]195.206.183.81:443
Thu Mar  4 00:25:48 2021 daemon.notice openvpn(TCP_UKVPN)[2278]: Socket Buffers: R=[87380->87380] S=[16384->16384]
Thu Mar  4 00:25:48 2021 daemon.notice openvpn(TCP_UKVPN)[2278]: Attempting to establish TCP connection with [AF_INET]195.206.183.81:443 [nonblock]
Thu Mar  4 00:25:49 2021 daemon.notice openvpn(TCP_UKVPN)[2278]: TCP connection established with [AF_INET]195.206.183.81:443
Thu Mar  4 00:25:49 2021 daemon.notice openvpn(TCP_UKVPN)[2278]: TCP_CLIENT link local: (not bound)
Thu Mar  4 00:25:49 2021 daemon.notice openvpn(TCP_UKVPN)[2278]: TCP_CLIENT link remote: [AF_INET]195.206.183.81:443
Thu Mar  4 00:25:49 2021 daemon.notice openvpn(TCP_UKVPN)[2278]: TLS: Initial packet from [AF_INET]195.206.183.81:443, sid=2ba3a384 ce16c965
Thu Mar  4 00:25:57 2021 daemon.err openvpn(TCP_UKVPN)[2278]: Connection reset, restarting [0]
Thu Mar  4 00:25:57 2021 daemon.notice openvpn(TCP_UKVPN)[2278]: SIGUSR1[soft,connection-reset] received, process restarting
Thu Mar  4 00:25:57 2021 daemon.notice openvpn(TCP_UKVPN)[2278]: Restart pause, 5 second(s)
Thu Mar  4 00:26:02 2021 daemon.warn openvpn(TCP_UKVPN)[2278]: WARNING: --ping should normally be used with --ping-restart or --ping-exit
Thu Mar  4 00:26:02 2021 daemon.notice openvpn(TCP_UKVPN)[2278]: NOTE: --fast-io is disabled since we are not using UDP
Thu Mar  4 00:26:02 2021 daemon.notice openvpn(TCP_UKVPN)[2278]: TCP/UDP: Preserving recently used remote address: [AF_INET]195.206.183.81:443
Thu Mar  4 00:26:02 2021 daemon.notice openvpn(TCP_UKVPN)[2278]: Socket Buffers: R=[87380->87380] S=[16384->16384]
Thu Mar  4 00:26:02 2021 daemon.notice openvpn(TCP_UKVPN)[2278]: Attempting to establish TCP connection with [AF_INET]195.206.183.81:443 [nonblock]
Thu Mar  4 00:26:04 2021 daemon.notice openvpn(TCP_UKVPN)[2278]: TCP connection established with [AF_INET]195.206.183.81:443
Thu Mar  4 00:26:04 2021 daemon.notice openvpn(TCP_UKVPN)[2278]: TCP_CLIENT link local: (not bound)
Thu Mar  4 00:26:04 2021 daemon.notice openvpn(TCP_UKVPN)[2278]: TCP_CLIENT link remote: [AF_INET]195.206.183.81:443
Thu Mar  4 00:26:04 2021 daemon.notice openvpn(TCP_UKVPN)[2278]: TLS: Initial packet from [AF_INET]195.206.183.81:443, sid=026b5bc5 d00f648e
Thu Mar  4 00:26:13 2021 daemon.err openvpn(TCP_UKVPN)[2278]: Connection reset, restarting [0]
Thu Mar  4 00:26:13 2021 daemon.notice openvpn(TCP_UKVPN)[2278]: SIGUSR1[soft,connection-reset] received, process restarting
Thu Mar  4 00:26:13 2021 daemon.notice openvpn(TCP_UKVPN)[2278]: Restart pause, 5 second(s)
Thu Mar  4 00:26:18 2021 daemon.warn openvpn(TCP_UKVPN)[2278]: WARNING: --ping should normally be used with --ping-restart or --ping-exit
Thu Mar  4 00:26:18 2021 daemon.notice openvpn(TCP_UKVPN)[2278]: NOTE: --fast-io is disabled since we are not using UDP
Thu Mar  4 00:26:18 2021 daemon.notice openvpn(TCP_UKVPN)[2278]: TCP/UDP: Preserving recently used remote address: [AF_INET]195.206.183.81:443
Thu Mar  4 00:26:18 2021 daemon.notice openvpn(TCP_UKVPN)[2278]: Socket Buffers: R=[87380->87380] S=[16384->16384]
Thu Mar  4 00:26:18 2021 daemon.notice openvpn(TCP_UKVPN)[2278]: Attempting to establish TCP connection with [AF_INET]195.206.183.81:443 [nonblock]
Thu Mar  4 00:26:19 2021 daemon.notice openvpn(TCP_UKVPN)[2278]: TCP connection established with [AF_INET]195.206.183.81:443
Thu Mar  4 00:26:19 2021 daemon.notice openvpn(TCP_UKVPN)[2278]: TCP_CLIENT link local: (not bound)
Thu Mar  4 00:26:19 2021 daemon.notice openvpn(TCP_UKVPN)[2278]: TCP_CLIENT link remote: [AF_INET]195.206.183.81:443
Thu Mar  4 00:26:19 2021 daemon.notice openvpn(TCP_UKVPN)[2278]: TLS: Initial packet from [AF_INET]195.206.183.81:443, sid=12227087 7c901268
Thu Mar  4 00:26:27 2021 daemon.err openvpn(TCP_UKVPN)[2278]: Connection reset, restarting [0]
Thu Mar  4 00:26:27 2021 daemon.notice openvpn(TCP_UKVPN)[2278]: SIGUSR1[soft,connection-reset] received, process restarting
Thu Mar  4 00:26:27 2021 daemon.notice openvpn(TCP_UKVPN)[2278]: Restart pause, 5 second(s)
Thu Mar  4 00:26:32 2021 daemon.warn openvpn(TCP_UKVPN)[2278]: WARNING: --ping should normally be used with --ping-restart or --ping-exit
Thu Mar  4 00:26:32 2021 daemon.notice openvpn(TCP_UKVPN)[2278]: NOTE: --fast-io is disabled since we are not using UDP
Thu Mar  4 00:26:32 2021 daemon.notice openvpn(TCP_UKVPN)[2278]: TCP/UDP: Preserving recently used remote address: [AF_INET]195.206.183.81:443
Thu Mar  4 00:26:32 2021 daemon.notice openvpn(TCP_UKVPN)[2278]: Socket Buffers: R=[87380->87380] S=[16384->16384]
Thu Mar  4 00:26:32 2021 daemon.notice openvpn(TCP_UKVPN)[2278]: Attempting to establish TCP connection with [AF_INET]195.206.183.81:443 [nonblock]
Thu Mar  4 00:26:33 2021 daemon.notice openvpn(TCP_UKVPN)[2278]: TCP connection established with [AF_INET]195.206.183.81:443
Thu Mar  4 00:26:33 2021 daemon.notice openvpn(TCP_UKVPN)[2278]: TCP_CLIENT link local: (not bound)
Thu Mar  4 00:26:33 2021 daemon.notice openvpn(TCP_UKVPN)[2278]: TCP_CLIENT link remote: [AF_INET]195.206.183.81:443
Thu Mar  4 00:26:33 2021 daemon.notice openvpn(TCP_UKVPN)[2278]: TLS: Initial packet from [AF_INET]195.206.183.81:443, sid=b4ed19cc d9c7818b
Thu Mar  4 00:26:42 2021 daemon.err openvpn(TCP_UKVPN)[2278]: Connection reset, restarting [0]
Thu Mar  4 00:26:42 2021 daemon.notice openvpn(TCP_UKVPN)[2278]: SIGUSR1[soft,connection-reset] received, process restarting
Thu Mar  4 00:26:42 2021 daemon.notice openvpn(TCP_UKVPN)[2278]: Restart pause, 10 second(s)
Thu Mar  4 00:26:52 2021 daemon.warn openvpn(TCP_UKVPN)[2278]: WARNING: --ping should normally be used with --ping-restart or --ping-exit
Thu Mar  4 00:26:52 2021 daemon.notice openvpn(TCP_UKVPN)[2278]: NOTE: --fast-io is disabled since we are not using UDP
Thu Mar  4 00:26:52 2021 daemon.notice openvpn(TCP_UKVPN)[2278]: TCP/UDP: Preserving recently used remote address: [AF_INET]195.206.183.81:443
Thu Mar  4 00:26:52 2021 daemon.notice openvpn(TCP_UKVPN)[2278]: Socket Buffers: R=[87380->87380] S=[16384->16384]
Thu Mar  4 00:26:52 2021 daemon.notice openvpn(TCP_UKVPN)[2278]: Attempting to establish TCP connection with [AF_INET]195.206.183.81:443 [nonblock]
Thu Mar  4 00:26:53 2021 daemon.notice openvpn(TCP_UKVPN)[2278]: TCP connection established with [AF_INET]195.206.183.81:443
Thu Mar  4 00:26:53 2021 daemon.notice openvpn(TCP_UKVPN)[2278]: TCP_CLIENT link local: (not bound)
Thu Mar  4 00:26:53 2021 daemon.notice openvpn(TCP_UKVPN)[2278]: TCP_CLIENT link remote: [AF_INET]195.206.183.81:443
Thu Mar  4 00:26:53 2021 daemon.notice openvpn(TCP_UKVPN)[2278]: TLS: Initial packet from [AF_INET]195.206.183.81:443, sid=62eb91fa 6cfa0c8d
Thu Mar  4 00:27:02 2021 daemon.err openvpn(TCP_UKVPN)[2278]: Connection reset, restarting [0]
Thu Mar  4 00:27:02 2021 daemon.notice openvpn(TCP_UKVPN)[2278]: SIGUSR1[soft,connection-reset] received, process restarting
Thu Mar  4 00:27:02 2021 daemon.notice openvpn(TCP_UKVPN)[2278]: Restart pause, 20 second(s)
Thu Mar  4 00:27:22 2021 daemon.warn openvpn(TCP_UKVPN)[2278]: WARNING: --ping should normally be used with --ping-restart or --ping-exit
Thu Mar  4 00:27:22 2021 daemon.notice openvpn(TCP_UKVPN)[2278]: NOTE: --fast-io is disabled since we are not using UDP
Thu Mar  4 00:27:22 2021 daemon.notice openvpn(TCP_UKVPN)[2278]: TCP/UDP: Preserving recently used remote address: [AF_INET]195.206.183.81:443
Thu Mar  4 00:27:22 2021 daemon.notice openvpn(TCP_UKVPN)[2278]: Socket Buffers: R=[87380->87380] S=[16384->16384]
Thu Mar  4 00:27:22 2021 daemon.notice openvpn(TCP_UKVPN)[2278]: Attempting to establish TCP connection with [AF_INET]195.206.183.81:443 [nonblock]
Thu Mar  4 00:27:23 2021 daemon.notice openvpn(TCP_UKVPN)[2278]: TCP connection established with [AF_INET]195.206.183.81:443
Thu Mar  4 00:27:23 2021 daemon.notice openvpn(TCP_UKVPN)[2278]: TCP_CLIENT link local: (not bound)
Thu Mar  4 00:27:23 2021 daemon.notice openvpn(TCP_UKVPN)[2278]: TCP_CLIENT link remote: [AF_INET]195.206.183.81:443
Thu Mar  4 00:27:23 2021 daemon.notice openvpn(TCP_UKVPN)[2278]: TLS: Initial packet from [AF_INET]195.206.183.81:443, sid=9bdf8b21 57b50614
Thu Mar  4 00:27:32 2021 daemon.err openvpn(TCP_UKVPN)[2278]: Connection reset, restarting [0]

Hope someone helps..
Thanks.

Kind regards,
Bassem Melika

I am afraid I cant be of much help, but this is what worked for me on this device. All this info has come from really knowledgeable and helpful people on this forum :slight_smile:

  1. Install OpenWRT

  2. Plug into home network using WLAN port, and to PC using LAN port

  3. Log in (192.168.1.1), and set root password

  4. Use putty to do these UCI commands:

uci set network.wwan=interface
uci set network.wwan.proto='qmi'
uci set network.wwan.device='/dev/cdc-wdm0'
uci set network.wwan.apn='yourAPN'
uci set network.wwan.modes='lte'
uci commit network
uci set firewall.@zone[1].network='wan wwan wan6'
uci commit firewall
ifup wwan
opkg update
opkg install luci-proto-qmi
/etc/init.d/uhttpd restart
reboot

  1. Install packages openvpn-openssl and luci-app-openvpn

  2. Reboot

  3. Upload your openVPN config

  4. Network, firewall. Edit wan(red) in Zones. Advanced, select tun0 in covered devices

  5. Modify the wan zone as shown using WinSCP:

config zone
option name 'wan'
option input 'REJECT'
option output 'ACCEPT'
option forward 'REJECT'
option masq '1'
option mtu_fix '1'
option network 'wan wan6'

Then add a vpn zone and forwarding like this:

config zone
option name 'vpn'
option input 'REJECT'
option output 'ACCEPT'
option forward 'REJECT'
option masq '1'
option mtu_fix '1'
list device 'tun0'

config forwarding
option src 'lan'
option dest 'vpn'

And remove the lan>wan forwarding

config forwarding
option src 'lan'
option dest 'wan'

  1. Should now be working after starting your VPN connection. This includes VPN kill switch - so you wont have any internet unless the VPN is up.

Thanks Andy. I have exactly the same..My problem is that the VPN client can connect once out of 100 trial..When it successfully connects it opens tun0 interface and the VPN works..however this is not the normal case always..The same OPVN NordVPN file fail to connect giving the below connection reset error:

Sun Mar  7 11:14:24 2021 daemon.warn openvpn(IL54_TCP)[2090]: WARNING: --ping should normally be used with --ping-restart or --ping-exit
Sun Mar  7 11:14:24 2021 daemon.notice openvpn(IL54_TCP)[2090]: NOTE: --fast-io is disabled since we are not using UDP
Sun Mar  7 11:14:24 2021 daemon.notice openvpn(IL54_TCP)[2090]: TCP/UDP: Preserving recently used remote address: [AF_INET]185.191.207.87:443
Sun Mar  7 11:14:24 2021 daemon.notice openvpn(IL54_TCP)[2090]: Socket Buffers: R=[87380->87380] S=[16384->16384]
Sun Mar  7 11:14:24 2021 daemon.notice openvpn(IL54_TCP)[2090]: Attempting to establish TCP connection with [AF_INET]185.191.207.87:443 [nonblock]
Sun Mar  7 11:14:25 2021 daemon.notice openvpn(IL54_TCP)[2090]: TCP connection established with [AF_INET]185.191.207.87:443
Sun Mar  7 11:14:25 2021 daemon.notice openvpn(IL54_TCP)[2090]: TCP_CLIENT link local: (not bound)
Sun Mar  7 11:14:25 2021 daemon.notice openvpn(IL54_TCP)[2090]: TCP_CLIENT link remote: [AF_INET]185.191.207.87:443
Sun Mar  7 11:14:26 2021 daemon.notice openvpn(IL54_TCP)[2090]: TLS: Initial packet from [AF_INET]185.191.207.87:443, sid=d23bafdf e4e59caf
Sun Mar  7 11:14:29 2021 daemon.err openvpn(US5894_TCP)[2089]: Connection reset, restarting [0]

While can once randomly succeed to connect..I believe this is something to do with my ISP restrictions on VPNs..however I don't know if the connection reset issue is traffic related or DNS related..can someone help me bypass this issue or any restrictions my ISP can do for the VPN to connect?

I currently configured my LAN configurations to use Google DNS 8.8.8.8, 8.8.4.4 and 1.1.1.1, however the issue still remains...do I need to change my ISP DNS elsewhere?..Any changes on firewall needed?..

@vgaetera

Can you please help me fix my NordVPN OPVN connection reset issue above...really appreciate it..

Collect the output and post it to pastebin.com redacting the private parts:

ubus call system board; uci show network; uci show firewall; uci show dhcp; \
ip address show; ip route show table all; ip rule show; iptables-save; \
head -v -n -0 /etc/resolv.* /tmp/resolv.* /tmp/resolv.*/*

Import this VPN profile to a smartphone and check whether it works with:

  • Another ISP or some hotspot
  • The same ISP if possible

Reconnect the mobile client a few times to be sure the result is persistent.

HYG https://pastebin.com/03mZmKnd

Regarding testing same OPVN on Android..I actually use NordVPN app on my android mobile and not all servers connect...some gets connected and some keep on the "connecting" state..So once I get a "connected" state server from my mobile I go download the same server OPVN and upload it to the router but again it fails 100 times to connect with connection reset error..and randomly can connect once in the middle of the day...

What if the ISP blocks OpenVPN or NordVPN protocol? How can we bypass that bro?

1 Like

Can you be confident that the problem is not at NordVPN's end? Does NordVPN have sufficient resources to accommodate all of its subscribers? The service is inexpensive, and has been advertised aggressively, so it's easy to imagine that lots of people have signed up for it; is it possible that NordVPN's infrastructure is struggling to cope with the number of users?

1 Like

Don't think so..I tried different things..

1- Connected by NordVPN mobile APP...took server name and tried it in the router = Failed
2- Connected by NordVPN mobile APP...took server name and tried it in OpenVPN mobile APP = Worked

So it seems its a router configuration issue (firewall maybe?..)...as NordVPN app and OpenVPN app works with same OPVN file used in the router..but for some reason I get the connection reset issue in the router..So it even doesnt seem for me its the ISP either as the NordVPN and OpenVPN mobile apps works fine.

1 Like

Have you tried performing a name lookup on that server name, directly from the router's command line?

From my own experience, NordVPN plays games with DNS, including various whack-a-mole dynamically-generated domain/host names. In addition, the Linux client for NordVPN aggressively tries to use NordVPN's own DNS servers "for security", rudely ignoring DHCP option 6. Excuse me, NordVPN, I run my own infrastructure and I know better than you do what should and shouldn't be permitted on my network "for security".

I wonder if other apps from NordVPN also exhibit the same sneaky DNS-avoidance tactics that the Linux client does. In other words, if you're trying to get it to work on the router using a "straight" configuration without any vendor-specific trickery, that might be one possible reason why it's acting cranky. It might need vendor-specific sneaky trickery to "work".

The above is all speculation, of course, but I would suggest keeping in mind the possibility that your problems might not be your fault. You could be doing everything right and the cause might be out of your control.

1 Like

root@OpenWrt:~# nslookup 185.191.204.132
Server: 127.0.0.1
Address: 127.0.0.1#53

Non-authoritative answer:
132.204.191.185.in-addr.arpa name = 204.132.hqserv.co.il

There seems an answer however still getting connection resets..

Tried reconnecting bro with same opvn file several times using OpenVPN app on the mobile (same ISP) and it worked smoothly..

1 Like

Modify the firewall config and disable peer DNS on the router:

uci set firewall.@defaults[0].synflood_protect="0"
uci add_list firewall.@zone[1].device="tun+"
uci commit firewall
/etc/init.d/firewall restart

uci set network.wwan.peerdns="0"
uci commit network
/etc/init.d/network restart

Most likely it won't solve the problem entirely, but it should still be more reliable.

Also try this open source mobile client and see whether the result matches the official one:
https://github.com/schwabe/ics-openvpn#openvpn-for-android
That should help to isolate the cause of the issue.

2 Likes

Hi bro. First of all, thanks a lot for your follow up and your support.

I applied all the commands above, but unfortunately the same connection reset issue is happening still..

The weird thing is that I downloaded the opensource VPN android client you provided and used the same OPVN file used in the original OpenVPN mobile app and it gave the same connection reset issue! Does that mean anything for you? The same OPVN file connects instantly on the NordVPN app and Original OpenVPN app but fails in the mobile opensource OpenVPN app exactly as the router...

1 Like

Can the firewall rule for incoming 443\tcp traffic is disabled but for instance the NAT rule was still in place and getting in the way of connecting to the openVPN daemon on the firewall itself? Do you think thats the case? How can we make sure that the firewall is allowing traffic for port 443 bro?

Well, that proves that the official client works differently as mentioned by @iplaywithtoys earlier.

Try to keep only essential options:

client
dev
proto
remote
nobind
persist-key
persist-tun
auth-user-pass
<ca>
</ca>
key-direction
<tls-auth>
</tls-auth>

And comment out the rest options.

Commented as here https://pastebin.com/tEpr2igE

But no change unfortunately..

Guys, I knew that my country is now banning OpenVPN over TCP and UDP. NordVPN app uses SSL tunneling and hence the connection works. Can we enable SSL tunneling on Openwrt? Or try TCP port forwarding?