A lot of conflicts appear on a fresh installation of debian for example that has both the ifconfig (old way) and iproute2 (the not so new replacement of ifconfig).
Applying network configurations (which probably is still done with ifconfig) will break the connections or have mixed results (double ip addresses for the same interface, one static + one dhcp ), ipv6 unable to be disabled.
systemd networking.service works with iproute2 which is not aware of what ifconfig does.
also the addresses of interfaces must be flushed to be consistent with the configuration.
Any thoughts on how this can be updated?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Webmin with Debian 12 is using ip addr add/del commands to configure networks. While Webmin doesn't use iproute2 using ip command shouldn't interere with configurtaions that can be done with iproute2 command ..
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
but ip is part of iproute2 :)
out of the box webmin is unable to effectively save and apply the network config in my case. I will investigate the behavior more and come back with everything that goes wrong. I was pulling my hair with it, why my interface was getting dhcp and static ip, plus ipv6 addressing wouldn't apply and stay disabled etc.
And probably webmin doesn't do an "ip addr flush" so it really applies the config consistently.
Last edit: BogdanV 2023-07-14
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
there are some (plenty) issues here.
if an interface was set with DHCP (which is by default) and then we change in webmin to static, webmin will create another virtual interface with static, leaving the original interface with dhcp.
Trying to delete/deactivate one/any active interface will fail. Failed to remove old address : RTNETLINK answers: Cannot assign requested address
(net/delete_aifcs.cgi line 19)
Using Apply selected interface buttons are broken throwing errors. Why haveing them there anyway then.
The only chance is to restart networking from command line, which will re-enable ipv6 on all interfaces. Seems that the main Apply configuration button works also.
Switching an interface to dhcp and trying to "Save and apply" will throw error.
Last edit: BogdanV 2023-08-10
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Yes, and Debian 11 and 12
Edit Bootup interface > Save and apply after changing to DHCP for example will fail with: Failed to save interface : You cannot activate an interface that uses DHCP or BOOTP
Also some things don't make sense there.
In Active now if edit and interface and set it Down and save, nothing happens.
If I use Deactivate selected interface will bring it down and the interface line can't be clicked anymore and set it up and there is no Activate selected interface
I have to go to Activated at boot and select and Apply selected interface to re-enable editing in Active now, then edit then set it up then save and get an error about Failed to save interface : '' is not a valid broadcast address because in Activated at Boot Broadcast network is set to automatic anyway. Fixed this and saved but interface remains Down and in configuration is still set to Down
It really doesn't make sense all these buttons that don't do what are supposed to do.
The only one that can apply configuration and bring all up is the main Apply configuration
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
One more issue.
The Netmask column on Active now for interfaces that get ip from DHCP will contain the value of the broadcast address and not the netmask address.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Setting ipv6 disabled does nothing (not persistent). At any time you apply configuration or restart networking manually (which probably is the same thing) the ipv6 is back.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
"Evidently wrong" are the other things I explained in the same message :)
- bringing down+up the interfaces
- ipv6 enable disable & persistent configuration.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
No change, i tried. Why would it?
Want me to record and upload a video and show what is happening?
Otherwise is pretty easy to reproduce, just spin up a VM within a network that has dhcp server and/with ipv6 capability, install debian12 for example and notice all the problems:
- ipv6 disabled is not persistent across reboots or network restart. it shows disabled in "activated at boot' config but it will not make any difference on active config after applying or restarting.
- "apply selected interface" will fail
- changing from dhcp to static will create additional interface/ip leaving the old one active.
Is not like I cannot go around these problems and fix it properly by disabling ipv6 through sysctl and proc/sys/net and edit manually the network config files but, since this is here and doesn't work as it should/advertised, maybe it should be addressed :)
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I'm sorry! I'm pretty confident that none of the issues you described happen with the latest Webmin 2.101 and all recent patches applied!
I have tried Debian 12 (beware, that it doesn't have any cloud-init scripts so potentially nothing could mess with network configuration upon reboots).
I tried switching from DHCP to Static, including IPv6 - all worked, just fine after reboots and upon time of applying the interface. I think it's not Webmin problem.
I would suggest to try removing or telling cloud-init not to change network config after reboots ..
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
A lot of conflicts appear on a fresh installation of debian for example that has both the ifconfig (old way) and iproute2 (the not so new replacement of ifconfig).
Applying network configurations (which probably is still done with ifconfig) will break the connections or have mixed results (double ip addresses for the same interface, one static + one dhcp ), ipv6 unable to be disabled.
systemd networking.service works with iproute2 which is not aware of what ifconfig does.
also the addresses of interfaces must be flushed to be consistent with the configuration.
Any thoughts on how this can be updated?
What distro have you installed Webmin on? Also, what Webmin version did you install?
Debian 12/bookworm, latest version of webmin 2.021
Is webmin still using as a default the ifconfig to configure and apply network config?
Last edit: BogdanV 2023-07-13
Webmin with Debian 12 is using
ip addr add/del
commands to configure networks. While Webmin doesn't useiproute2
usingip
command shouldn't interere with configurtaions that can be done withiproute2
command ..but ip is part of iproute2 :)
out of the box webmin is unable to effectively save and apply the network config in my case. I will investigate the behavior more and come back with everything that goes wrong. I was pulling my hair with it, why my interface was getting dhcp and static ip, plus ipv6 addressing wouldn't apply and stay disabled etc.
And probably webmin doesn't do an "ip addr flush" so it really applies the config consistently.
Last edit: BogdanV 2023-07-14
there are some (plenty) issues here.
if an interface was set with DHCP (which is by default) and then we change in webmin to static, webmin will create another virtual interface with static, leaving the original interface with dhcp.
Trying to delete/deactivate one/any active interface will fail.
Failed to remove old address : RTNETLINK answers: Cannot assign requested address
(net/delete_aifcs.cgi line 19)
Using Apply selected interface buttons are broken throwing errors. Why haveing them there anyway then.
The only chance is to restart networking from command line, which will re-enable ipv6 on all interfaces. Seems that the main Apply configuration button works also.
Switching an interface to dhcp and trying to "Save and apply" will throw error.
Last edit: BogdanV 2023-08-10
Is this all happening with latest Webmin 2.101?
Yes, and Debian 11 and 12
Edit Bootup interface > Save and apply after changing to DHCP for example will fail with:
Failed to save interface : You cannot activate an interface that uses DHCP or BOOTP
Also some things don't make sense there.
In Active now if edit and interface and set it Down and save, nothing happens.
If I use Deactivate selected interface will bring it down and the interface line can't be clicked anymore and set it up and there is no Activate selected interface
I have to go to Activated at boot and select and Apply selected interface to re-enable editing in Active now, then edit then set it up then save and get an error about Failed to save interface : '' is not a valid broadcast address because in Activated at Boot Broadcast network is set to automatic anyway. Fixed this and saved but interface remains Down and in configuration is still set to Down
It really doesn't make sense all these buttons that don't do what are supposed to do.
The only one that can apply configuration and bring all up is the main Apply configuration
One more issue.
The Netmask column on Active now for interfaces that get ip from DHCP will contain the value of the broadcast address and not the netmask address.
Setting ipv6 disabled does nothing (not persistent). At any time you apply configuration or restart networking manually (which probably is the same thing) the ipv6 is back.
What Network config type do you have set in Networking ⇾ Network Configuration index page? It is written right under Network Configuration title?
Network config type: Debian Linux
Can you zip up and attach the whole
/etc/network
directory to this ticket?Sure. It's nothing fancy just the "stock" config.
Alright. Do you have
ifconfig
command installed?of course, both ifconfig and ip
What's interesting is that webmin still shows that ipv6 is disabled but where does webmin keep this? Definitelly not in the interfaces or sysctl
Last edit: BogdanV 2023-08-16
Dang, sadly there was a bug in my regex!
The actual patch is here.
You could try to install latest nightly build or apply the linked patch above manually and let me know if that works for you!?
Any update on it? Did you manage to give it a try?
netmask thing is ok.
Alright, great! Please let us know if there is anything evidently wrong!
"Evidently wrong" are the other things I explained in the same message :)
- bringing down+up the interfaces
- ipv6 enable disable & persistent configuration.
If you removed
net-tools
package from your system, would that change anything in a positive way?No change, i tried. Why would it?
Want me to record and upload a video and show what is happening?
Otherwise is pretty easy to reproduce, just spin up a VM within a network that has dhcp server and/with ipv6 capability, install debian12 for example and notice all the problems:
- ipv6 disabled is not persistent across reboots or network restart. it shows disabled in "activated at boot' config but it will not make any difference on active config after applying or restarting.
- "apply selected interface" will fail
- changing from dhcp to static will create additional interface/ip leaving the old one active.
Is not like I cannot go around these problems and fix it properly by disabling ipv6 through sysctl and proc/sys/net and edit manually the network config files but, since this is here and doesn't work as it should/advertised, maybe it should be addressed :)
I'm sorry! I'm pretty confident that none of the issues you described happen with the latest Webmin 2.101 and all recent patches applied!
I have tried Debian 12 (beware, that it doesn't have any cloud-init scripts so potentially nothing could mess with network configuration upon reboots).
I tried switching from DHCP to Static, including IPv6 - all worked, just fine after reboots and upon time of applying the interface. I think it's not Webmin problem.
I would suggest to try removing or telling cloud-init not to change network config after reboots ..