Dead man's hand, or how to self reset when not accessible from outside?

Hello everyone,

For some time I have moved from my hometown, and the first thing I did was to buy another router and flash openwrt to it, everything worked great.

My issue is with the isp, where I live now, every once in a while, sporadically, I loose the ability to connect from outside, meaning that my public ip does not work.

I have a homelab , kubernetes cluster and I host services for myself, and I absolutely hate when this happens, not even wireguard works, which is installed directly on the router.

The way I used to solve this issue from a distance was to keep an active vpn connection to a headscale server(hosted on Azure)and just reverse proxy in my router, and reboot it.

But now the same thing happens with the router in my hometown, and I am sure it's the ISP(because it is the same).

What i was thinking to do is a script that has the functionality of canyouseeme-org, that reboots the router when ports that should be open are not visible.

What do you guys think? Is this something anyone else had to do? Do you have a better suggestion?

For context, both connections are from the same ISP, we use PPPoE, and the ip is dynamic(different each time the pppoe connection is renewed )

Regards!

You need some keepalive script that monitors upstream connection. Unlikely OpenWRT on its own chokes after lengthy disuse.

Hello and thank you for the reply.

I am sure this issue is not caused by openwrt, i wanted to make that clear. I simply wanted to know if there is a better alternative to my ideea.

Restart wan connection when router knows it is down.

And for router crashing some contain hardware watchdog like high end server - when software does not reset the dead mans switch the device reboots. You need to look into sources to determine which router has it or not, feature is not exposed in toh.

If the router itself is not down and a restart could fix it then have a look at watchcat: https://openwrt.org/packages/pkgdata/watchcat

4 Likes

So to be clear, there was still some kind of (faulty) Internet connection - still maintaining a live VPN connection to an Azure instance?

For example if you have a dsl line with pppoe you can enable keep-alive in both, it has 2 effects - keeps line alive, and detects when it is not, usually restarting thing properly. If not your bug report due. Typical provider will reconfigure network weekly or monthly without impacting customer line, but if you did not exchang traffic for hours it may trigger to clear your line status.
Another cheap keepalive - ntp.

Thank you all for your suggestions , and sorry for the poorly explained context.
The behavior is as follows:
My connection to the internet works, the router works, i have a public ip, dynamic, that changes each time the pppoe connection is restarted.
The isp does not simply restart the pppoe connection , and using the connection(meaning being at home using wifi) I cannot see that my connection is down, because everything works.
However, sporadically, after more than 3-4 weeks of connection, I sometimes loose the ability to connect from outside, this can be seen also from alert(i use uptime robot's service).

Additional stuff that should help but dont:

  1. My kubernetes cluster has a job that runs every 30 minutes and checks if the public ip changed, and if so, it updates it on cloudflare(and on my domain) -- this does not help because the ip does not change
  2. I have services that can be accessed from outside and allow me to navigate inside my network, like vscode-server(with embedded firefox, on a raspberry pi) and i also have wireguard(this directly on the router), neither one is accesible when the issue happens - so it is not a server/cluster problem
  3. The isp has a ddns serviec of their own, using that makes no difference, tried using that , jsut to see if maybe tey have a adifferent ip than the one that gets updated on cloudflare, but nope, same ip
  4. Tried a different router, I also had this issue before, when the internet was provided by the ISP router, which is now in bridge mode for my ax4200.

And again, when this happens, if I'm at home, everything works, i can game, watch yt, browse github , absolutely no issue.

As @brada4 said, a simple wan interface restart, solves my issue, and creating a script would not be a issue for me, I just want to know if there is something else , preferably something that would not get wiped when I do my next update .

regards and thank you all for your replies and work !

Cloudflare offers their VPN service for customers so that your kubernetes turns into their client as long as there is any connection up.

Great advice but I only use them for dns purposes, no proxy or tunnels.
I would rather not depend or at least not depend solely on a vendor, otherwise this can also be solved by using the free tailscale service.

Not about global vpn but connecting their infra over approx wireguard.

1 Like

Stating the obvious: If this happens when the pppoe connection is up for several weeks, you could simply restart the wan interface in regular shorter intervals -- once a week, every three days, every night at 5am (like I do) -- using cron.

1 Like

Huh, I used to do a daily reboot back in my dd-wrt gargoyle days.
I think this will eventually be my solution, a cron for weekly reboot , sometimes the answer is so simple it's just silly I did not think of this.

Thank you all for the help

I believe a full-blown reset is unnecessary if it's a problem with upstream getting hung up on something. A simple connection reset should have the same effect. My crontab entry to restart the wan interface every day at 5:15am looks like this:

15 5 * * * ifup wan

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.