541 Commits

Author SHA1 Message Date
Ilia Ross
0dbb5d2f89 Fix to share ifupdown parser with network detection
Some checks failed
Tests / prove (push) Has been cancelled
Package and upload artifacts / build (push) Has been cancelled
2026-06-23 15:00:32 +02:00
Ilia Ross
8ba6a02122 Merge branch 'master' into dev/add-deb-dhcpcd-support-1607 2026-06-21 00:00:06 +02:00
Ilia Ross
74fd072551 Fix to drop unnecessary parens 2026-06-20 20:23:36 +02:00
Ilia Ross
b75a95dd42 Fix missing space after if 2026-06-20 20:22:08 +02:00
Ilia Ross
0cf6654fd9 Fix Postfix localhost destination after hostname domain change
- When the system hostname domain changes, update `localhost.<old-domain>` in Postfix `mydestination` to `localhost.<new-domain>`.

- This sits alongside the existing hostname/FQDN updates for Postfix destinations.

Previous behavior:

`save_dns.cgi` only updated Postfix `mydestination` entries that exactly matched:

- the old short hostname, like `host`
- the old FQDN, like `host.old-domain.test`

It did **not** update:

- `localhost.old-domain.test`

So if you changed:

```text
host.old-domain.test
```

to:

```text
host.new-domain.test
```

Postfix could become:

```text
mydestination = host.new-domain.test, host, localhost.old-domain.test
```

After this hunk, it also updates that localhost domain entry:

```text
localhost.old-domain.test
```

to:

```text
localhost.new-domain.test
```
2026-06-20 15:33:22 +02:00
Ilia Ross
c08468ec48 Fix network config spacing preservation
- Preserve existing spacing and inline comments when rewriting `/etc/nsswitch.conf` `hosts:` lines.

- Preserve indentation, comment prefix, inline comments, and field separators when rewriting `/etc/hosts` rows.

- Add tests for the `nsswitch.conf` spacing/comment behavior.
2026-06-20 15:27:28 +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
090aed60df Fix to remove unrelated network formatting cleanups 2026-06-20 14:44:51 +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
Imre Eilertsen
5f72e2e97e Update no 2026-06-15 13:50:04 +02:00
Ilia Ross
ad06644617 Add minimal Alpine Linux compatibility
This PR adds baseline Alpine Linux support in Webmin with OS detection, APK package and update backend, OpenRC boot integration, ifupdown-style networking support and DHCPD defaults.

https://github.com/webmin/webmin/issues/2353
2026-06-06 23:11:25 +02:00
Ilia Ross
6574373761 Fix to detect NetworkManager networking on Debian
ⓘ Prefer Netplan when Debian has Netplan YAML config, otherwise select the existing NetworkManager backend for Debian systems with saved NM connection profiles, with regression tests for backend selection.

https://github.com/webmin/webmin/issues/2559
2026-06-02 01:33:59 +02:00
Ilia Ross
b33b9fb0a0 Fix NetworkManager IPv6 DNS nameserver saving
Some checks failed
Tests / prove (push) Has been cancelled
Build / build (push) Has been cancelled
Close inactive / close-inactive (push) Has been cancelled
https://github.com/webmin/webmin/issues/2559
2026-06-02 01:12:24 +02:00
Ilia Ross
7f63875c42 Drop unnes quotemeta for params to be used 2026-05-19 11:25:34 +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
695c78f631 Fix previously broken Farsi translations 2025-05-30 21:36:00 +03:00
Ilia Ross
833292c0d1 Add exported German language-neutral strings
https://github.com/webmin/webmin/discussions/2482
https://forum.virtualmin.com/t/on-the-rejection-of-gender-neutral-language/133527
2025-05-26 14:48:11 +03:00
Ilia Ross
501698ad4b Fix to use German rules most people already accept 1/2
https://github.com/webmin/webmin/discussions/2482
2025-05-24 20:43:25 +03:00
Jamie Cameron
8358bd20af Turn off caching when reading network manager config files, as they may be modified by the nm cli command
https://forum.virtualmin.com/t/virtualmin-virtualserver-ip-copy-to-services/133442/12
2025-05-20 16:43:39 -07:00
Jamie Cameron
2aee714a81 Handle case where two interfaces are modified
https://github.com/webmin/webmin/issues/1546
2025-03-23 10:42:45 -07:00
Ilia Ross
85e7f6c292 Fix to filter out scope identifier
* We could support it but it would be much more work
2025-03-10 13:32:39 +02:00
Ilia Ross
9fa35cc2c9 Fix to save IPv6 nameservers 2025-03-10 13:31:32 +02:00
Jamie Cameron
9ba9bfd524 Merge branch 'master' of github.com:webmin/webmin 2025-03-06 19:03:47 -08:00
Jamie Cameron
6c5c5fa225 No need for modprobe since IPv6 is always in the kernel these days
https://github.com/webmin/webmin/issues/2432
2025-03-06 18:51:14 -08:00
Ilia Ross
495a196b2f Fix type when adding addr 2025-03-06 14:22:49 +02:00
Jamie Cameron
50eb61b89e Use the ip command instead of ifconfig 2025-03-05 20:56:42 -08:00
MacSteini
f799102e7a Update de 2025-03-04 11:34:53 +00:00
Ilia Ross
6d10d5aa55 Update translations 2025-02-27 13:56:29 +02:00
Ilia Ross
1cef7128d1 Fix to improve wording when applying network 2025-02-27 13:54:39 +02:00
MacSteini
c89ff93b4d Update de 2025-02-25 00:00:14 +00:00
Jamie Cameron
d54e7217d6 Log the apply action
https://github.com/webmin/webmin/issues/2422
2025-02-24 15:29:00 -08:00
Ilia Ross
f880192526 Remove languages with 0% coverage
https://github.com/webmin/webmin/issues/2403#issuecomment-2652613588
2025-02-12 13:19:49 +02:00
Jamie Cameron
c6a0aa1f15 Check for separate gateway field https://forum.virtualmin.com/t/add-new-server-is-removing-the-gateway/131904 2025-02-04 19:52:54 -08:00
MacSteini
162206949f Consecutive Spaces Replacement
Replaced multiple consecutive spaces with a single space
2024-12-16 16:57:09 +00:00
MacSteini
5ea0cc6b42 Trailing Spaces Removal
Removed trailing spaces
2024-12-16 15:16:55 +00:00
MacSteini
477982776c Updated de
Corrections (UTF-8, new lines at file end), amendments, updates
2024-11-26 01:43:34 +00:00
MacSteini
54793b4596 Update de 2024-09-07 16:32:17 +01:00
Jamie Cameron
60a9419cc3 Use static routes to set the default gateway https://forum.virtualmin.com/t/ubuntu-and-network-configurations/126890 2024-05-25 22:18:53 -07:00
Jamie Cameron
cbd7a91d5c Cache the list of boot interfaces https://forum.virtualmin.com/t/webmin-network-settings-does-not-pickup-or-allow-setting-of-default-route/126466/ 2024-05-08 09:39:29 -07:00
Jamie Cameron
919601d1c6 Preserve all post-up directives https://github.com/webmin/webmin/issues/2080 2024-01-28 16:26:32 -08:00
Jamie Cameron
fd56523955 Use /etc/hostname if available https://forum.virtualmin.com/t/setup-fails/124437 2024-01-20 10:39:49 -08:00
Ilia Ross
8665c5a725 Fix to include directory name, as glob result isn't readdir
https://forum.virtualmin.com/t/re-i-think-i-found-another-issue/123981/13
2023-12-17 15:37:19 +02:00
Ilia Ross
28e55d6774 Revert "What if /etc/network/interfaces is a directory https://forum.virtualmin.com/t/re-i-think-i-found-another-issue/123981"
This reverts commit f2476e0a6d.
2023-12-17 15:35:09 +02:00
Jamie Cameron
f2476e0a6d What if /etc/network/interfaces is a directory https://forum.virtualmin.com/t/re-i-think-i-found-another-issue/123981 2023-12-16 17:46:00 -08:00
Jamie Cameron
8bad9dd0f8 DNS domains are also space separated 2023-12-13 15:57:06 -08:00
Jamie Cameron
35bae257f2 Don't add IP address if there isn't one 2023-11-15 17:14:54 -08:00
Jamie Cameron
b095aa2b20 Show the actual command that failed in the error 2023-11-14 20:20:06 -08:00
Jamie Cameron
07fc4621f8 DNS server IPs are space separated https://forum.virtualmin.com/t/trouble-with-saving-in-network-config-section/123394 2023-11-09 11:18:24 -08:00
Jamie Cameron
627a047028 Next virtual interface is always one greater than the last one 2023-11-07 17:56:02 -08:00