0

Interface changes and more aggressive re-connection

Is there a way to make nextdns more aggressive in trying to connect to the servers after it detects an interface change? 

I've been restarting the process to force this, but doing so quickly gets old. I frequently go on and off the VPN at work , wireless to wired, and wired to wireless, which forces an interface change. nextdns detects the change the instant it happens, but then spends 2 to unlimited minutes waiting to connect to nextdns servers.

Example 1

Here's a typical example from the `nextdns log` command:

Feb 09 10:35:54 laptop nextdns[611]: Network change detected: enp4s0f3u2u1i5 added
Feb 09 10:44:43 laptop nextdns[611]: Received signal: terminated
Feb 09 10:44:43 laptop  nextdns[611]: Stopping NextDNS 1.37.7/linux
Feb 09 10:44:43 laptop nextdns[611]: Deactivating
Feb 09 10:44:43 laptop nextdns[611]: NextDNS 1.37.7/linux stopped
Feb 09 10:44:43 laptop systemd[1]: Started NextDNS DNS53 to DoH proxy..
Feb 09 10:44:43 laptop nextdns[4368]: Starting NextDNS 1.37.7/linux on localhost:53
Feb 09 10:44:43 laptop nextdns[4368]: Listening on TCP/[::1]:53
Feb 09 10:44:43 laptop nextdns[4368]: Listening on TCP/127.0.0.1:53
Feb 09 10:44:43 laptop nextdns[4368]: Listening on UDP/127.0.0.1:53
Feb 09 10:44:43 laptop nextdns[4368]: Listening on UDP/[::1]:53
Feb 09 10:44:48 laptop nextdns[4368]: Activating
Feb 09 10:45:15 laptop nextdns[4368]: Connected [2a07:a8c0::]:443 (con=18ms tls=123ms, TCP, TLS13)
Feb 09 10:45:15 laptop nextdns[4368]: Connected 143.110.229.87:443 (con=18ms tls=100ms, TCP, TLS13)

I gave up waiting for it and forced a restart at 10:44:43, 9 minutes after the interface change. The interface has full IP v4/v6 connectivity and mtr/ping against default gateway and other internet addresses (off network) works immediately.

Example 2 (wifi -> docking station)

On the rare occasion nextdns does automatically switch, we have a log like this:

Jan 23 08:39:39 laptop nextdns[599]: Network change detected: enp4s0f3u2u1i5 added
Jan 23 08:41:24 laptop nextdns[599]: Connected 143.110.229.87:443 (con=19ms tls=17ms, TCP, TLS13)
Jan 23 08:43:50 laptop nextdns[599]: Connected [2604:a880:4:1d0::181:d000]:443 (con=21ms tls=16ms, TCP, TLS13)

roughly 2 minutes to connect. Why isn't it instantaneous (sub 1s?)

I can't find anything obvious in the code, but I'm also not really familiar with Go.

Example 3 (docking station -> wifi)

Jan 23 20:13:29 laptop nextdns[599]: Network change detected: enp4s0f3u2u1i5 removed
Jan 23 20:18:36 laptop nextdns[599]: Connected 143.110.229.87:443 (con=23ms tls=23ms, TCP, TLS13)

 

Thanks for any pointers or advice in advance.

Reply

null

Content aside

  • 2 yrs agoLast active
  • 42Views
  • 1 Following