Re: debian12: something destroys /etc/network/interfaces at boot
Thank you for your mail. On Wed, Mar 27, 2024 at 12:42 AM Andy Smith wrote: > On Tue, Mar 26, 2024 at 06:33:42PM +0100, Steffen Dettmer wrote: > > I changed a gateway on a remote site using /etc/network/interfaces by > > changing gateway. However, at reboot some old gateway IP reappears. I I also think that there is some Debian packaging rule about one > package not altering the config file of another package unless by > co-operation between the maintainers, so if this does actually turn > out to be Debian there might be bugs to report. Thanks to Pierre-Elliott it became clear that this was caused by a virtualisation platform, so to say "change from outside", and thus I found nothing related "inside". (This is a Proxmox feature to setup containers, and someone made a mistake in the Proxmox configuration;so nothing wrong in Debian at all) Steffen
Re: debian12: something destroys /etc/network/interfaces at boot
Thank you for your quick reply. On Wed, Mar 27, 2024 at 12:22 AM Henning Follmann wrote: > On Tue, Mar 26, 2024 at 06:33:42PM +0100, Steffen Dettmer wrote: > > I changed a gateway on a remote site using /etc/network/interfaces by > > changing gateway. However, at reboot some old gateway IP reappears. I > > I have no clue where the wrong 2.43 comes from. > [...] deleted that nonsense. Nonsense? I think the lines illustrate the issue to the experienced eye and in fact, it did, so that Pierre-Elliott spotted the issue (I tell it in a second). > why are you making it so difficult to anyone trying to help you? I don't know, surely not intentional. I just ran out of ideas. > Nobody is interested in your way how you edit that file. Sure, except: Emacs or Vim, which is better? (Just kidding :)) > please show us two versions of that file (pre reboot and after) > Also tell us any programs you use to manage your network settings I had told I would use vim to edit the file... but I had been wrong! The machine I SSH'd to in fact was not a machine, but rather a container, and the network configured by the virtualisation environment! That is what changes the IP. The container op made an error in the IP and I was the unfortunate one just arriving in time :) > [] NetworkManager > [] systemd-networkd > [] some magic own scripts > [] ... [x] vim [x] Proxmox (but I didn't know this) (*1) (*1) don't work together well :) Regards, Steffen
Re: debian12: something destroys /etc/network/interfaces at boot
On Tue, Mar 26, 2024 at 11:27 PM Dustin Jenkins wrote: > On my Debian 12 system, the connman service was helping itself to interfaces, > including my bridge interfaces that I wanted left alone. Maybe try disabling > or removing it? > > sudo systemctl stop connman > sudo systemctl disable connman Thank you for your help! Yes, good idea! (I don't have it, but a good point. Related, I read often in internet of similar possible issues with some network manager versions) I couldn't see the cause in the whole file system, and as Thankfully Pierre-Elliott Bécue correctly saw from a wide distance that this is because - it is in fact not in the file system. But outside. Namely a virtualisation environment set it into a container (the machine actually is "just" a container). Regards, Steffen
Re: debian12: something destroys /etc/network/interfaces at boot
Thank your for your quick and detailed reply. On Tue, Mar 26, 2024 at 7:01 PM Greg Wooledge wrote: > On Tue, Mar 26, 2024 at 06:33:42PM +0100, Steffen Dettmer wrote: > > I changed a gateway on a remote site using /etc/network/interfaces by > > changing gateway. However, at reboot some old gateway IP reappears. > > So then the question is *which* of the many different subsystems is in > use to set the system's default gateway. It might be coming from /e/n/i > or from NetworkManager or from systemd-networkd or others. Yes, but I found nothing in any logfile, the IP did not appear anywhere in the file system and I had no idea what to do... It turned out the machine actually is a virtualisation container and the infrastructure configures the IP (which was incorrectly set in the virtualization web GUI). Well, and I didn't see this, but fortunately Pierre-Elliott Bécue (from this list) saw it instead. > > root@site4-nas:~# ls -l /etc/network/interfaces > > -rw-r--r-- 1 root root 117 Mar 26 18:19 /etc/network/interfaces > > root@site4-nas:~# grep gateway /etc/network/interfaces > > gateway 192.168.2.43 > > See, that's not useful. That's not how this file is structured. It's > NOT just a series of independent lines. Yes, thanks, sure, I know. I just wanted to show that it does change automagically at reboot (it is written by virtualisation environment when the container is being started). The stanza was correct, just gateway IP was wrong, because someome made an error in the container configuration and it just so happend that it was my little foot where it fell onto... Best regards, Steffen
Re: debian12: something destroys /etc/network/interfaces at boot
On Tue, Mar 26, 2024 at 7:18 PM Pierre-Elliott Bécue wrote: > As it's a PVE kernel I guess you rely on Proxmox. > *Theoretically*, Proxmox VE uses /etc/network/interfaces.new to apply THIS! (OMG why didn't I see this! Thank you!!) ohh thanks so much for your quick reply, my "machine" indeed is a Proxmox-Container, and someone made a typo in the container settings, so Proxmox configures the container accordingly. For other files, like resolv.conf, Proxmox adds "# --- BEGIN PVE ---" lines, but not in interfaces. Thank you Steffen
Re: debian12: something destroys /etc/network/interfaces at boot
Hello, On Tue, Mar 26, 2024 at 06:33:42PM +0100, Steffen Dettmer wrote: > I changed a gateway on a remote site using /etc/network/interfaces by > changing gateway. However, at reboot some old gateway IP reappears. I > really hate when some magic knows better than an explicitly set value. > What happens here? How can I get rid of this? It is 100% reproducible. > > I have no clue where the wrong 2.43 comes from. Is this actually Debian? I have vague memories of someone else asking something like this before, and at the time I wasn't aware of any software packaged in Debian that alters the user's /etc/network/interfaces file. I think in that case it turned out to not actually be Debian. I also think that there is some Debian packaging rule about one package not altering the config file of another package unless by co-operation between the maintainers, so if this does actually turn out to be Debian there might be bugs to report. Thanks, Andy -- https://bitfolk.com/ -- No-nonsense VPS hosting
Re: debian12: something destroys /etc/network/interfaces at boot
On Tue, Mar 26, 2024 at 06:33:42PM +0100, Steffen Dettmer wrote: > Hi, > > I changed a gateway on a remote site using /etc/network/interfaces by > changing gateway. However, at reboot some old gateway IP reappears. I > really hate when some magic knows better than an explicitly set value. > What happens here? How can I get rid of this? It is 100% reproducible. > > I have no clue where the wrong 2.43 comes from. > > Any hints appreciated! > > Steffen > > [...] deleted that nonsense. Hello, why are you making it so difficult to anyone trying to help you? Nobody is interested in your way how you edit that file. please show us two versions of that file (pre reboot and after) Also tell us any programs you use to manage your network settings [] NetworkManager [] systemd-networkd [] some magic own scripts [] ... -H -- Henning Follmann | hfollm...@itcfollmann.com
Re: debian12: something destroys /etc/network/interfaces at boot
As it's a PVE kernel I guess you rely on Proxmox. *Theoretically*, Proxmox VE uses /etc/network/interfaces.new to apply its config and potential manual changes made by an administrator (changes that should be applied afterwards via ifreload). I'd wonder whether this mechanism is not the cause if your troubles. -- PEB Steffen Dettmer wrote on 26/03/2024 at 18:33:42+0100: > Hi, > > I changed a gateway on a remote site using /etc/network/interfaces by > changing gateway. However, at reboot some old gateway IP reappears. I > really hate when some magic knows better than an explicitly set value. > What happens here? How can I get rid of this? It is 100% reproducible. > > I have no clue where the wrong 2.43 comes from. > > Any hints appreciated! > > Steffen > > > root@site4-nas:~# ls -l /etc/network/interfaces > -rw-r--r-- 1 root root 117 Mar 26 18:19 /etc/network/interfaces > root@site4-nas:~# grep gateway /etc/network/interfaces > gateway 192.168.2.43 > root@site4-nas:~# perl -npi -e 's/gateway 192.168.2.43/gateway > 192.168.2.1/' /etc/network/interface > s > root@site4-nas:~# grep gateway /etc/network/interfaces > gateway 192.168.2.1 > root@site4-nas:~# ls -l /etc/network/interfaces > -rw-r--r-- 1 root root 116 Mar 26 18:21 /etc/network/interfaces > root@site4-nas:~# sync > root@site4-nas:~# date; sleep 1m; date > Tue Mar 26 06:21:47 PM CET 2024 > Tue Mar 26 06:22:47 PM CET 2024 > root@site4-nas:~# ls -l /etc/network/interfaces > -rw-r--r-- 1 root root 116 Mar 26 18:21 /etc/network/interfaces > > OK, so gateway is correct in 18:21 timestamped user config file. Lets reboot. > > root@site4-nas:~# reboot > root@site4-nas:~# Connection to site4-nas closed by remote host. > Connection to site4-nas closed. > root@site4-pve:~# ssh site4-nas > Linux site4-nas 6.5.11-8-pve #1 SMP PREEMPT_DYNAMIC PMX 6.5.11-8 > (2024-01-30T12:27Z) x86_64... > Last login: Tue Mar 26 18:20:50 2024 from 192.168.2.28 > root@site4-nas:~# ls -l /etc/network/interfaces > -rw-r--r-- 1 root root 117 Mar 26 18:23 /etc/network/interfaces > root@site4-nas:~# grep gateway /etc/network/interfaces > gateway 192.168.2.43 > > root@site4-nas:~# find /etc /lib/systemd/ /var/lib/ -type f -print0 | > xargs --null grep 192.168.2.43 > /etc/network/interfaces:gateway 192.168.2.43 > > user config file has updated timestamp and contains bougous gateway. > > Help please! signature.asc Description: PGP signature
Re: debian12: something destroys /etc/network/interfaces at boot
On Tue, Mar 26, 2024 at 06:33:42PM +0100, Steffen Dettmer wrote: > I changed a gateway on a remote site using /etc/network/interfaces by > changing gateway. However, at reboot some old gateway IP reappears. So then the question is *which* of the many different subsystems is in use to set the system's default gateway. It might be coming from /e/n/i or from NetworkManager or from systemd-networkd or others. > root@site4-nas:~# ls -l /etc/network/interfaces > -rw-r--r-- 1 root root 117 Mar 26 18:19 /etc/network/interfaces > root@site4-nas:~# grep gateway /etc/network/interfaces > gateway 192.168.2.43 See, that's not useful. That's not how this file is structured. It's NOT just a series of independent lines. We would need to see the entire /e/n/i file to know which interface that gateway definition is associated with, and so on. A gateway definition on an interface that isn't managed by /e/n/i (ifupdown) will do nothing at all. For example, you might have an eno1 definition which includes a gateway line, but which does *not* have an "auto eno1" line to activate it -- in which case the interface might be managed by NetworkManager instead, or something else.
Re: debian12: something destroys /etc/network/interfaces at boot
On my Debian 12 system, the connman service was helping itself to interfaces, including my bridge interfaces that I wanted left alone. Maybe try disabling or removing it? sudo systemctl stop connman sudo systemctl disable connman Best > On Mar 26, 2024, at 10:33, Steffen Dettmer wrote: > > Hi, > > I changed a gateway on a remote site using /etc/network/interfaces by > changing gateway. However, at reboot some old gateway IP reappears. I > really hate when some magic knows better than an explicitly set value. > What happens here? How can I get rid of this? It is 100% reproducible. > > I have no clue where the wrong 2.43 comes from. > > Any hints appreciated! > > Steffen > > > root@site4-nas:~# ls -l /etc/network/interfaces > -rw-r--r-- 1 root root 117 Mar 26 18:19 /etc/network/interfaces > root@site4-nas:~# grep gateway /etc/network/interfaces >gateway 192.168.2.43 > root@site4-nas:~# perl -npi -e 's/gateway 192.168.2.43/gateway > 192.168.2.1/' /etc/network/interface >s > root@site4-nas:~# grep gateway /etc/network/interfaces >gateway 192.168.2.1 > root@site4-nas:~# ls -l /etc/network/interfaces > -rw-r--r-- 1 root root 116 Mar 26 18:21 /etc/network/interfaces > root@site4-nas:~# sync > root@site4-nas:~# date; sleep 1m; date > Tue Mar 26 06:21:47 PM CET 2024 > Tue Mar 26 06:22:47 PM CET 2024 > root@site4-nas:~# ls -l /etc/network/interfaces > -rw-r--r-- 1 root root 116 Mar 26 18:21 /etc/network/interfaces > > OK, so gateway is correct in 18:21 timestamped user config file. Lets reboot. > > root@site4-nas:~# reboot > root@site4-nas:~# Connection to site4-nas closed by remote host. > Connection to site4-nas closed. > root@site4-pve:~# ssh site4-nas > Linux site4-nas 6.5.11-8-pve #1 SMP PREEMPT_DYNAMIC PMX 6.5.11-8 > (2024-01-30T12:27Z) x86_64... > Last login: Tue Mar 26 18:20:50 2024 from 192.168.2.28 > root@site4-nas:~# ls -l /etc/network/interfaces > -rw-r--r-- 1 root root 117 Mar 26 18:23 /etc/network/interfaces > root@site4-nas:~# grep gateway /etc/network/interfaces >gateway 192.168.2.43 > > root@site4-nas:~# find /etc /lib/systemd/ /var/lib/ -type f -print0 | > xargs --null grep 192.168.2.43 > /etc/network/interfaces:gateway 192.168.2.43 > > user config file has updated timestamp and contains bougous gateway. > > Help please! >
debian12: something destroys /etc/network/interfaces at boot
Hi, I changed a gateway on a remote site using /etc/network/interfaces by changing gateway. However, at reboot some old gateway IP reappears. I really hate when some magic knows better than an explicitly set value. What happens here? How can I get rid of this? It is 100% reproducible. I have no clue where the wrong 2.43 comes from. Any hints appreciated! Steffen root@site4-nas:~# ls -l /etc/network/interfaces -rw-r--r-- 1 root root 117 Mar 26 18:19 /etc/network/interfaces root@site4-nas:~# grep gateway /etc/network/interfaces gateway 192.168.2.43 root@site4-nas:~# perl -npi -e 's/gateway 192.168.2.43/gateway 192.168.2.1/' /etc/network/interface s root@site4-nas:~# grep gateway /etc/network/interfaces gateway 192.168.2.1 root@site4-nas:~# ls -l /etc/network/interfaces -rw-r--r-- 1 root root 116 Mar 26 18:21 /etc/network/interfaces root@site4-nas:~# sync root@site4-nas:~# date; sleep 1m; date Tue Mar 26 06:21:47 PM CET 2024 Tue Mar 26 06:22:47 PM CET 2024 root@site4-nas:~# ls -l /etc/network/interfaces -rw-r--r-- 1 root root 116 Mar 26 18:21 /etc/network/interfaces OK, so gateway is correct in 18:21 timestamped user config file. Lets reboot. root@site4-nas:~# reboot root@site4-nas:~# Connection to site4-nas closed by remote host. Connection to site4-nas closed. root@site4-pve:~# ssh site4-nas Linux site4-nas 6.5.11-8-pve #1 SMP PREEMPT_DYNAMIC PMX 6.5.11-8 (2024-01-30T12:27Z) x86_64... Last login: Tue Mar 26 18:20:50 2024 from 192.168.2.28 root@site4-nas:~# ls -l /etc/network/interfaces -rw-r--r-- 1 root root 117 Mar 26 18:23 /etc/network/interfaces root@site4-nas:~# grep gateway /etc/network/interfaces gateway 192.168.2.43 root@site4-nas:~# find /etc /lib/systemd/ /var/lib/ -type f -print0 | xargs --null grep 192.168.2.43 /etc/network/interfaces:gateway 192.168.2.43 user config file has updated timestamp and contains bougous gateway. Help please!