core
core copied to clipboard
No IPv6 Web GUI access if LAN interface is set to 'Track Interface'
Important notices
Before you add a new report, we ask you kindly to acknowledge the following:
- [x] I have read the contributing guide lines at https://github.com/opnsense/core/blob/master/CONTRIBUTING.md
- [x] I am convinced that my issue is new after having checked both open and closed issues at https://github.com/opnsense/core/issues?q=is%3Aissue
Describe the bug
If a LAN interface is tracking a WAN interface and the Web GUI is configured to only listen on this LAN interface, the Web GUI is inaccessible via IPv6.
To Reproduce
Steps to reproduce the behavior:
- Make sure the WAN and LAN interfaces have default settings (WAN: DHCPv4 + DHCPv6 with prefix delegation, LAN: Static IPv4 + 'Track Interface' IPv6).
- Go to 'System: Settings: Administration', set the 'Web GUI Listen Interfaces' to 'LAN', save and reboot.
- See error: The Web GUI is not accessible via the LAN IPv6 address.
- Access the Web GUI via the LAN IPv4 address, go to 'System: Diagnostics: Services' and restart the webgui service.
- See result: The Web GUI is now accessible via the LAN IPv6 address.
Expected behavior
The Web GUI should be accessible via IPv6 without having to manually restart the service after a reboot.
Relevant log files
Excerpt from /var/etc/lighty-webConfigurator.conf
after a reboot:
## bind to port (default: 80)
server.bind = "127.0.0.1"
server.port = 80
$SERVER["socket"] == "127.0.0.1:80" {
}
$SERVER["socket"] == "[::1]:80" {
}
$SERVER["socket"] == "192.168.1.1:80" {
}
After webgui service restart:
## bind to port (default: 80)
server.bind = "127.0.0.1"
server.port = 80
$SERVER["socket"] == "127.0.0.1:80" {
}
$SERVER["socket"] == "[::1]:80" {
}
$SERVER["socket"] == "192.168.1.1:80" {
}
$SERVER["socket"] == "[2001:db8:1234:5600:215:5dff:fed2:761b]:80" {
}
Additional context
It works when not selecting specific listen interfaces ($SERVER["socket"] == "[::]:80"
).
Environment
OPNsense 23.1.a_102 (amd64, OpenSSL) Hyper-V Gen2 Ver10.0
Same issue for SSH. After a reboot, the tracking LAN interface's IPv6 address is missing from /usr/local/etc/ssh/sshd_config
and IPv6 SSH access doesn't work. Restarting the openssh service temporarily fixes this.
Historical context seems to be #1347.
I'm happy to try and tackle this while working on #5933, but it might not be a pretty outcome.
Cheers, Franco
@maurice-w I was a bit surprised to see a newwanip
event for web GUI already implemented. The issue here is that newwanip is not called for LAN, only for WAN... 745d46c could work, but is not the best thing structurally as webgui (and other things) may be loaded multiple times.
RC1 seems to behave for the time being. Nothing to do and do another iteration if necessary.