Commit Graph

42 Commits

Author SHA1 Message Date
Ilia Ross
8ba6a02122 Merge branch 'master' into dev/add-deb-dhcpcd-support-1607 2026-06-21 00:00:06 +02:00
Ilia Ross
cb4a322042 Fix active virtual interface handling
ⓘ Treat Linux active virtual interfaces as secondary IP addresses instead of independent links, fixing alias parsing, hiding invalid status controls, rejecting down-state creation, and removing existing aliases with ip addr del when needed.

Reproduce path:

Example repro before this fix:

1. Go to **Network Configuration → Network Interfaces → Active Now**.
2. Click **Add a new interface**.
3. Enter:

```text
Name: enp0s5:1
IPv4 address: 10.211.55.21
Netmask: 255.255.255.0
Status: Down
```

4. Click **Create**.

Before the fix, Webmin could still create the alias or handle it inconsistently, because `enp0s5:1` is not a real link that can be “down”. It is just an extra IP address on `enp0s5`.

Expected after the fix:

- The UI should not offer `Status` for active virtual aliases.
- If someone submits `up=0` manually anyway, Webmin rejects it with:
  `Virtual interfaces cannot be created with down status`
- If an existing active virtual alias is saved as down through lower-level code, Webmin removes the IP using something like:

```bash
ip addr del 10.211.55.21/24 dev enp0s5
```
2026-06-20 15:23:09 +02:00
Ilia Ross
f2782073ce Fix to remove factored-out virtual alias changes 2026-06-20 15:09:31 +02:00
Ilia Ross
7ebe3f7dfa Add dhcpcd network backend for Debian and Raspberry Pi OS
This PR adds dhcpcd backend support for Debian and Raspberry Pi OS network configuration. It detects dhcpcd only as a final fallback after Netplan, NetworkManager, and ifupdown, preventing Webmin from incorrectly falling back to `/etc/network/interfaces` on dhcpcd-managed systems.

The new backend reads and writes `/etc/dhcpcd.conf`, including DHCP and static IPv4/IPv6 configuration, gateways, static routes, DNS servers, search domains, MTU, and virtual IPv4 aliases. It also supports implicit DHCP-managed interfaces for default dhcpcd setups with no explicit interface blocks, and handles `allowinterfaces` / `denyinterfaces` behavior.

This PR also fixes apply/delete flows for dhcpcd-managed interfaces and virtual aliases, avoids rewriting generated `/etc/resolv.conf`, preserves spacing/comments in touched hosts and nsswitch files, and tightens Active Now handling so virtual aliases are treated as IP addresses rather than independent links.

https://github.com/webmin/webmin/issues/1607
2026-06-20 01:57:50 +02:00
Ilia Ross
846bbb8252 Fix to preserve Netplan YAML when saving DNS
* Note: Preserve existing Netplan indentation when updating DNS settings, validate with netplan generate before applying, and surface apply errors to avoid network loss from malformed YAML.
2026-05-19 00:31:34 +02:00
Ilia Ross
1cef7128d1 Fix to improve wording when applying network 2025-02-27 13:54:39 +02:00
Jamie Cameron
d54e7217d6 Log the apply action
https://github.com/webmin/webmin/issues/2422
2025-02-24 15:29:00 -08:00
MacSteini
5ea0cc6b42 Trailing Spaces Removal
Removed trailing spaces
2024-12-16 15:16:55 +00:00
Jamie Cameron
fd762c2f47 Add missing logging messages 2023-07-16 15:03:37 -07:00
Jamie Cameron
07a46ff561 Start of work on networkmanager support 2023-06-14 21:27:12 -07:00
Jamie Cameron
b9ed596e3e Add another bridge parameter field 2023-04-16 11:00:59 -07:00
Jamie Cameron
ec3c00090d Show network config format in UI 2020-12-28 14:30:39 -08:00
Ilia Rostovtsev
68f1f5750e Add support for showing network interfaces on Dashboard https://github.com/authentic-theme/authentic-theme/issues/1453 2020-05-20 23:41:08 +03:00
Jamie Cameron
1b1579ad1b Allow commenting out of hosts file entries 2019-07-03 01:35:33 -07:00
Jamie Cameron
1f838a7257 Fix typo 2017-06-30 13:46:01 -07:00
casparsmit
4bb2ebb84e Add common spanning tree tunables for bridges 2016-04-12 14:35:36 +02:00
Jamie Cameron
9189c1446a Support configure a primary teaming interface, thanks to Caspar Smit 2016-04-05 21:40:44 -07:00
Jamie Cameron
139b4fb666 Allow creation of a bridge with no real interface 2012-11-26 14:36:46 -08:00
Jamie Cameron
8fd020858e Bonding support on CentOS / Redhat 2012-08-24 16:18:22 -07:00
Jamie Cameron
175a62d425 No-address fixes 2011-06-28 12:28:23 -04:00
Jamie Cameron
9f51a78df1 Fixes for bridge support 2011-06-27 20:54:41 -07:00
Jamie Cameron
be8675fc88 Start of work on bridge support 2011-06-27 23:20:10 -04:00
Jamie Cameron
10c9d5fe89 Show interface status on linux 2011-05-04 14:46:03 -07:00
Jamie Cameron
a0fd5422e9 Solaris default route management fixes 2011-01-22 09:41:13 -08:00
Jamie Cameron
52e02d51d3 More work on Solaris support for IPv6 2011-01-20 22:00:11 -08:00
Jamie Cameron
ee5e50beef Option to disable IPv6 for an interface 2011-01-20 17:30:55 -08:00
Jamie Cameron
d7043e0f7f Work on IPv6 address auto-configuration 2011-01-20 16:55:21 -08:00
Jamie Cameron
47ed1daf55 Debian IPv6 management 2011-01-20 13:38:22 -08:00
Jamie Cameron
a9a99e1dc2 Redhat IPv6 route management 2011-01-19 18:15:44 -08:00
Jamie Cameron
ab6f2f9586 IPv6 address management for active interfaces 2011-01-18 21:42:45 -08:00
Jamie Cameron
a9d5c6e244 Start of work on IPv6 support 2011-01-15 11:45:40 -08:00
Jamie Cameron
20a3936f43 Don't perform text substitutions where not needed 2010-12-05 22:48:54 -08:00
Jamie Cameron
e6404835bb Nicer wording 2008-08-27 21:31:59 +00:00
Jamie Cameron
f312ee690e Completed ui-lib conversion 2008-08-26 23:09:24 +00:00
Jamie Cameron
7c3c6f5cde More ui-lib conversion 2008-08-26 06:07:25 +00:00
Jamie Cameron
b63992a1d7 Shorten tabs 2008-08-20 01:05:35 +00:00
Jamie Cameron
cb4aae5dbe More ui-lib conversion for ipnodes, plus mass deletion button 2008-08-18 02:36:12 +00:00
Jamie Cameron
50fa599335 More ui-lib conversion 2008-08-18 01:50:26 +00:00
Jamie Cameron
86b2133e9f Added support for comments on interfaces 2007-11-16 23:21:33 +00:00
Jamie Cameron
f4bf66ff56 VLAN and bonding support 2007-11-11 21:42:45 +00:00
Jamie Cameron
c270fa753f Gentoo 2006+ networking support 2007-06-14 01:57:30 +00:00
Jamie Cameron
fc1c1b243f Initial checkin of Webmin 2007-04-12 20:24:50 +00:00