Frequent Internet Connection Failure

Hello,

I'm having trouble with my internet connection and it keeps failing with Socket Errors. This is the second time I am experiencing this error and I'm not sure what is causing this problem. When I hard reset the router and manually configure it again, it starts working for about a month or two and then starts failing with these socket errors again. If I restore the backup archive after I hard reset the router, the problem returns immediately.

It sometimes fails when doing downloads and more times when doing uploads. In the speedtest screenshot attached you can see that the connection drops before the upload test fully completes. When I initiate the speedtest on my mobile, it fails with the error "Test failed to complete. Please check your connection and try again.".

Please let me know how do I go about troubleshooting this problem.

Thanks & Regards,
Clifford Anup Dhamanigi.

Try running a ping session from the router or any other device on the LAN to 8.8.8.8, and see if the ping time outs during your failing test(s).

I have the following DNS Set on the WAN as per my ISP settings:

202.88.156.6
202.88.156.8

For the Client DHCP Addresses, I'm using 1.1.1.1 and 1.0.0.1 as my DNS Addresses.

I tried doing a ping test to 8.8.8.8, 1.1.1.1 and 1.0.0.1 while doing the speed test, I don't see any timeouts in the ping results.

Ran the ping test and the speed test again from the same client device, I got 1 ping timeout for the DNS address 1.1.1.1.

What device is it, anyway?

Netgear R6220 running OpenWrt 19.07.5 Full Release

I'm seeing a lot of the following warnings in the System Log:

Sun Jan 10 22:28:01 2021 daemon.warn dnsmasq[4131]: possible DNS-rebind attack detected: app.adjust.com
Sun Jan 10 22:28:01 2021 daemon.warn dnsmasq[4131]: possible DNS-rebind attack detected: config.unityads.unity3d.com
Sun Jan 10 22:28:08 2021 daemon.warn dnsmasq[4131]: possible DNS-rebind attack detected: app.adjust.com
Sun Jan 10 22:28:12 2021 daemon.warn dnsmasq[4131]: possible DNS-rebind attack detected: app.adjust.com
Sun Jan 10 22:28:21 2021 daemon.warn dnsmasq[4131]: possible DNS-rebind attack detected: config.unityads.unity3d.com
Sun Jan 10 22:28:27 2021 daemon.warn dnsmasq[4131]: possible DNS-rebind attack detected: app.adjust.com
Sun Jan 10 22:28:33 2021 daemon.warn dnsmasq[4131]: possible DNS-rebind attack detected: app.adjust.com
Sun Jan 10 22:28:58 2021 daemon.warn dnsmasq[4131]: possible DNS-rebind attack detected: app.adjust.com
1 Like

This is a regular home network, I really doubt anybody inside my own network is skilled enough to do something this complex... :smile:

You're missing the point, it might be a client side script, injected during regular surf ("bad" ads and such)

Kill the clients, and see if the warnings go away.

And maybe the connection failures will too.

2 Likes

I disabled DHCP on all the interfaces and set my phone to a static IP address and rebooted the router. The dnsmasq 4131 warning went away, but the connection drops still happen.

I just found that my openvpn connected interface doesn't have the same connection drop issues. All my other local interfaces have the same connection drops.

I followed the instructions in the following article to create a separate iptable called vpn and route the traffic of only one interface through the vpn and bypass the vpn for the rest of the interfaces.

Do you think, this can cause a problem?

Any other ideas? I don't want to go about simply resetting the router and configuring it from scratch again ONLY to be haunted back with the same problem a few weeks later. I want to understand the root cause behind the connection drops.

Any help in diagnosing and troubleshooting the problem will be greatly appreciated.

Ran a tcpdump and found that the Kernel is dropping many packets and causing many Re-transmissions. This is looking more and more like a bug in OpenWrt or the driver. How and where do I report the bug? What details and information will I need to provide?

root@OpenWrt:~# tcpdump -i br-lan -w /mnt/sda1/tcpdump/tcpdump.pcap
tcpdump: listening on br-lan, link-type EN10MB (Ethernet), capture size 262144 bytes
^C24604 packets captured
39397 packets received by filter
14785 packets dropped by kernel
root@OpenWrt:~#

You didn't say how long you pinged/how many.

That's normal. I think you grossly misunderstand what the output means if it concerns you:

dropped by kernel (this is the number of packets that were dropped, due to a lack of buffer space, by the packet capture mechanism in the OS on which tcpdump is running, if the OS reports that information to applications; if not, it will be reported as 0).

~ from the manual

Can you actually show this to us, please?

I haven't seen any information regarding the problem you describe.

You didn't say how long you pinged/how many

I was continuously running the ping in the background for about 2-3 mins. I pinged 4 DNS addresses during the course of this time.

Thank you for bringing the tcpdump functioning manual to my notice regarding the packet drops.

Can you actually show this to us, please?

I haven't seen any information regarding the problem you describe.

I did not capture the screenshot of the error that occurred on my laptop, but this is the error I received. This error occurred only once on my laptop, but I keep receiving the test failed error messages on all my mobile phones, screenshot attached in my previous post.

  • Where did you see the socket error messgae?
  • Can you explain your setup - particularly how OpenVPN is involved?
  • Could you upgrade to 19.07.6?
  • BTW, this convinces me there either isn't a problem; or that the VPN setup may be causing an issue
1 Like

Where did you see the socket error messgae?

I only saw the socket error message on the speedtest download test failure message.

Can you explain your setup - particularly how OpenVPN is involved?

I had created a custom IP Table called VPN and implemented Split-Tunneling by routing only one of my 3 Local Interfaces through the VPN and the rest was configured to by-pass the VPN. I accomplished this by adding a custom route up command pointing to a custom script in the configuration file of my nordvpn configuration file. The script would ensure to remove the default routing entries made by openvpn to route everything through the VPN and ensure that ONLY the split-tunnel interface ip addresses would be routed through the VPN. I followed the instructions in the article of the following URL:

https://medium.com/@ingamedeo/openvpn-splittunneling-on-openwrt-e4302a1a4e12#:~:text=Split-tunneling%20is%20a%20networking,on%20its%20source%20IP%20address

I have since discarded by custom openvpn connection settings and uninstalled the openvpn package as well. But, the intermittent connection drops continue despite having discarded my custom openvpn setup.

Could you upgrade to 19.07.6?

I have upgraded it today.