Bug #10142
closedUsing LAN interface for WAN leads to weird behaviors
0%
Description
According to the official docs, pfSense has kept the first and the second interface named WAN and LAN respectively, for history (legacy?) reasons.
When we have a multi-wan setup and eventually one of the WAN gateways is assigned to the "LAN" interface, it leads to some weird behaviors, such as:
- DHCP leases page listing the "LAN" as an interface that has DHCP leases, when it does NOT
!Screenshot from 2019-12-31 16-15-22.png!
- System DNS name being resolved as the external IP address, instead of as the internal one
!Screenshot from 2019-12-31 16-35-29.jpg!
- Maybe others that I haven't noticed yet
More specifically, as far as the DNS resolver goes, this is the code that it uses to create the $hostname.$domain DNS entry as well as the /etc/hosts entry. You can see that it will look for an interface named "LAN" and regardless of whether it has a gateway assigned to it, it will be assigned to DNS named $hostname.$domain
IMHO, the interfaces should not be named as such, and ideally, no logic should be dependent on the interface names, because it's not semantic - as one could just attach a gateway to a LAN interface, for instance.
I understand, however, that this is deeply embedded into pfSense's code, as seen here and therefore a change on this area would be more difficult, and probably a breaking one for most users.
A solution that could work and it's probably a compromise between current state and my suggestion would be the ability to rename the interfaces, so that we could move the "LAN" interface to something that it's actually serving as a LAN.
I apologize if this is not the right place for this kind of discussions, but if not I will be grateful if you could point me towards the right direction.
Thanks!
Files