Re: Forcing dhclient to not ignore tun0 interface when it's available

2023-03-10 Thread davenull
On 2023-03-10 01:51, David Wright wrote: On Tue 07 Mar 2023 at 17:53:10 (+0100), daven...@tuxfamily.org wrote: So I'm clearly being lazy this time. I'd rather find a solution which is relatively "easy and fast" to implement, than work for free chattr -i ? Scripted of course. Yeah,, I'm

Re: Forcing dhclient to not ignore tun0 interface when it's available

2023-03-09 Thread David Wright
On Tue 07 Mar 2023 at 17:53:10 (+0100), daven...@tuxfamily.org wrote: > > So I'm clearly being lazy this time. I'd rather find a solution which > is relatively "easy and fast" to implement, than work for free chattr -i ? Scripted of course. Cheers, David.

Re: Forcing dhclient to not ignore tun0 interface when it's available

2023-03-09 Thread David Wright
On Tue 07 Mar 2023 at 17:17:24 (+0100), daven...@tuxfamily.org wrote: > On 2023-03-07 05:01, David Wright wrote: > > On Mon 06 Mar 2023 at 13:34:52 (+0100), daven...@tuxfamily.org wrote: > > > On 2023-03-03 16:00, Max Nikulin wrote: > > > > On 03/03/2023 13:29, Tim Woodall wrote: > > > > > On Fri,

Re: Forcing dhclient to not ignore tun0 interface when it's available

2023-03-07 Thread davenull
On 2023-03-07 16:20, Max Nikulin wrote: On 06/03/2023 19:17, davenull wrote: On 2023-03-03 06:22, Max Nikulin wrote: Perhaps the opposite. dhclient running for enp2s0f0 should detect that VPN is active and to avoid overwriting DNS settings that direct requests to tun0. Yes, indeed. I want

Re: Forcing dhclient to not ignore tun0 interface when it's available

2023-03-07 Thread davenull
On 2023-03-07 05:01, David Wright wrote: On Mon 06 Mar 2023 at 13:34:52 (+0100), daven...@tuxfamily.org wrote: On 2023-03-03 16:00, Max Nikulin wrote: > On 03/03/2023 13:29, Tim Woodall wrote: > > On Fri, 3 Mar 2023, Max Nikulin wrote: > > > > > > dhclient running for enp2s0f0 should detect

Re: Forcing dhclient to not ignore tun0 interface when it's available

2023-03-07 Thread davenull
Hello On 2023-03-07 05:01, David Wright wrote: On Mon 06 Mar 2023 at 13:17:23 (+0100), daven...@tuxfamily.org wrote: On 2023-03-03 06:22, Max Nikulin wrote: > On 03/03/2023 10:08, Tim Woodall wrote: > > New to this thread, so might be totally off-piste but openvpn > > has hooks > > to run

Re: Forcing dhclient to not ignore tun0 interface when it's available

2023-03-07 Thread Max Nikulin
On 06/03/2023 19:17, davenull wrote: On 2023-03-03 06:22, Max Nikulin wrote: Perhaps the opposite. dhclient running for enp2s0f0 should detect that VPN is active and to avoid overwriting DNS settings that direct requests to tun0. Yes, indeed. I want dhclient to NOT overwrite /etc/resolv.conf

Re: Forcing dhclient to not ignore tun0 interface when it's available

2023-03-06 Thread David Wright
On Mon 06 Mar 2023 at 13:34:52 (+0100), daven...@tuxfamily.org wrote: > On 2023-03-03 16:00, Max Nikulin wrote: > > On 03/03/2023 13:29, Tim Woodall wrote: > > > On Fri, 3 Mar 2023, Max Nikulin wrote: > > > > > > > > dhclient running for enp2s0f0 should detect that VPN is > > > > active and to

Re: Forcing dhclient to not ignore tun0 interface when it's available

2023-03-06 Thread David Wright
On Mon 06 Mar 2023 at 13:17:23 (+0100), daven...@tuxfamily.org wrote: > On 2023-03-03 06:22, Max Nikulin wrote: > > On 03/03/2023 10:08, Tim Woodall wrote: > > > New to this thread, so might be totally off-piste but openvpn > > > has hooks > > > to run scripts like this: > > ... > > > This is

Re: Forcing dhclient to not ignore tun0 interface when it's available

2023-03-06 Thread davenull
On 2023-03-03 16:00, Max Nikulin wrote: On 03/03/2023 13:29, Tim Woodall wrote: On Fri, 3 Mar 2023, Max Nikulin wrote: dhclient running for enp2s0f0 should detect that VPN is active and to avoid overwriting DNS settings that direct requests to tun0. The hook can create and delete a file

Re: Forcing dhclient to not ignore tun0 interface when it's available

2023-03-06 Thread davenull
Hello On 2023-03-03 06:22, Max Nikulin wrote: On 03/03/2023 10:08, Tim Woodall wrote: New to this thread, so might be totally off-piste but openvpn has hooks to run scripts like this: ... This is server side but the route-up/pre-down work client side too. Since it's workplace's VPN, which

Re: Forcing dhclient to not ignore tun0 interface when it's available

2023-03-04 Thread David Wright
lient[39759]: No DHCPOFFERS received. > > > Feb 28 14:32:25 debian-laptop dhclient[39759]: No working leases in > > > persistent database - sleeping. > > > Feb 28 14:32:25 debian-laptop dave: > > > /etc/dhcp/dhclient-exit-hooks.d/zzz_avahi-autoipd returned no

Re: Forcing dhclient to not ignore tun0 interface when it's available

2023-03-04 Thread Kamil Jońca
David Wright writes: [...] > > This is the job that packages like openresolv are designed > to do. BTW if you look up that package in apt's lists, note > that this is a case where you need man's section number, because > man 8 resolvconf without the 8 will give you a systemd page. +1 I have

Re: Forcing dhclient to not ignore tun0 interface when it's available

2023-03-03 Thread davenull
when connecting or disconnecting the vpn, IDK. No it wasn't, the vpn was connected hours before that. and disconnected hours after that. This is exactly my point, thus the topic name "Forcing dhclient to not ignore tun0 interface when it's available" vpn is up and running, tun0 is

Re: Forcing dhclient to not ignore tun0 interface when it's available

2023-03-03 Thread David Wright
On Fri 03 Mar 2023 at 22:00:37 (+0700), Max Nikulin wrote: > On 03/03/2023 13:29, Tim Woodall wrote: > > On Fri, 3 Mar 2023, Max Nikulin wrote: > > > > > > dhclient running for enp2s0f0 should detect that VPN is active > > > and to avoid overwriting DNS settings that direct requests to > > >

Re: Forcing dhclient to not ignore tun0 interface when it's available

2023-03-03 Thread Max Nikulin
On 03/03/2023 13:29, Tim Woodall wrote: On Fri, 3 Mar 2023, Max Nikulin wrote: dhclient running for enp2s0f0 should detect that VPN is active and to avoid overwriting DNS settings that direct requests to tun0. The hook can create and delete a file like rhis: tim@dirac:/etc/dhcp (none)$

Re: Forcing dhclient to not ignore tun0 interface when it's available

2023-03-02 Thread Tim Woodall
On Fri, 3 Mar 2023, Max Nikulin wrote: On 03/03/2023 10:08, Tim Woodall wrote: New to this thread, so might be totally off-piste but openvpn has hooks to run scripts like this: ... This is server side but the route-up/pre-down work client side too. Presumably you can do something here to

Re: Forcing dhclient to not ignore tun0 interface when it's available

2023-03-02 Thread Max Nikulin
On 03/03/2023 10:08, Tim Woodall wrote: New to this thread, so might be totally off-piste but openvpn has hooks to run scripts like this: ... This is server side but the route-up/pre-down work client side too. Presumably you can do something here to renew dhcp leases or restore resolv.conf.

Re: Forcing dhclient to not ignore tun0 interface when it's available

2023-03-02 Thread David Wright
On Thu 02 Mar 2023 at 11:44:17 (+0100), daven...@tuxfamily.org wrote: > > I finally had the time to dig into the logs from two days ago, when > the problem happens again > It seems that dhclient does it requests trying different interfaces > EXCEPT tun0 (see syslog below) > > I looked into

Re: Forcing dhclient to not ignore tun0 interface when it's available

2023-03-02 Thread Tim Woodall
On Thu, 2 Mar 2023, daven...@tuxfamily.org wrote: Hello On 2023-02-24 10:19, daven...@tuxfamily.org wrote: Hello, [?] Otherwise, when VPN is disconnected, I DO want /etc/resolv.conf to be generated according to my home router's DHCP tells the computer ? yes, that one. Cheers, David.

Forcing dhclient to not ignore tun0 interface when it's available

2023-03-02 Thread davenull
Hello On 2023-02-24 10:19, daven...@tuxfamily.org wrote: Hello, […] Otherwise, when VPN is disconnected, I DO want /etc/resolv.conf to be generated according to my home router's DHCP tells the computer … yes, that one. Cheers, David. I finally had the time to dig into the logs from two