Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Loosing Connections #219

Open
maaft opened this issue May 12, 2022 · 2 comments
Open

Loosing Connections #219

maaft opened this issue May 12, 2022 · 2 comments

Comments

@maaft
Copy link

maaft commented May 12, 2022

Hi,

I'm facing some weird connection issues.

My setup is the following:

  • 1 devicee behind an LTE router: clientA
  • 1 server on some cloud service A clientB
  • 1 server on some other cloud service B: server (runs innernet-server)

server has ufw configured:

26346                         ALLOW       Anywhere                  
Anywhere                   ALLOW       10.5.0.0/16               
Anywhere                   ALLOW       172.0.0.0/8               
51820                         ALLOW       Anywhere                    
Anywhere                   ALLOW       10.42.0.0/16              
51820/udp                  ALLOW       Anywhere                  
26346 (v6)                  ALLOW       Anywhere (v6)             
51820 (v6)                  ALLOW       Anywhere (v6)             
51820/udp (v6)           ALLOW       Anywhere (v6) 

10.42.0.0/16 is my innernet network.

clientB (innernet client) and server (innernet server) can see each other all the time.

But clientA is loosing the connection once about every 12 hours and can't seem to reconnect.

innernet fetch <network> also does not help

When I do the following steps on server:

  1. ufw disable
  2. innernet fech
  3. ufw enable

The connection between clientA and server can be reestablished.

The connection will stay active for some time (usually multiple hours) until its getting lost again.

I suspect that the LTE router changes access points often. Could this be the case here?
What has this to do with my ufw config?

Any help or ideas to debug this are appreciated.

@mcginty
Copy link
Collaborator

mcginty commented May 20, 2022

Out of curiosity, does doing innernet down <network> && innernet up <network> make any difference compared to innernet fetch <network>?

Also, it might be worth checking some basic things like the output of ip route before and after the connection seems to be working.

@esbeeb
Copy link

esbeeb commented Sep 24, 2022

FWIW: Wireguard has a "PersistentKeepalive" feature. That's helped me a lot in my wireguard configs in the past (pre-innernet). Like adding a line like "PersistentKeepalive = 25" at the end of my wireguard conf file, in the [Peer] section, worked. That sends a KeepAlive packet every 25 seconds, ensuring the tunnel never gets closed off by any intermediary router. These KeepAlive packets are small, amounting to only like 8MB in a month, for 1 client.

Your (behind-an-LTE-connection) client switching IP addresses would seemingly not matter, as wireguard (I can't speak for the magic which innernet additionally performs) can gracefully and transparently handle such changes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants