I think I should describe my setup in more detail to avoid confusion.
Since this is a pfSense → OPNsense migration project, the OPNsense box is currently sitting inside my local network behind pfSense (pfSense LAN network).
pfSense LAN network: 10.10.1.0/24
OPNsense WAN IP: 10.10.1.99
OPNsense LAN network: 10.20.1.0/24 (with LAN gateway 10.20.1.1)
When testing from LAN (behind OPNsense):
My test machine gets an IP in the 10.20.1.xxx range from OPNsense.
domain.name resolves either via OPNsense DNS (Unbound DNS overrides) or by the /etc/hosts file on the test machine.
Both dig domain.name and ping domain.name resolve to 10.20.1.1.
When testing from WAN (in front of OPNSense, behind pfSense):
My test machine gets an IP in the 10.10.1.xxx range from pfSense.
domain.name resolves either via pfSense DNS or the test machine's /etc/hosts.
Both dig domain.name and ping domain.name resolve to 10.10.1.99 (the OPNsense WAN IP).
The results of the connection tests I described in my original post still apply under this setup.
Since this is a pfSense → OPNsense migration project, the OPNsense box is currently sitting inside my local network behind pfSense (pfSense LAN network).
pfSense LAN network: 10.10.1.0/24
OPNsense WAN IP: 10.10.1.99
OPNsense LAN network: 10.20.1.0/24 (with LAN gateway 10.20.1.1)
When testing from LAN (behind OPNsense):
My test machine gets an IP in the 10.20.1.xxx range from OPNsense.
domain.name resolves either via OPNsense DNS (Unbound DNS overrides) or by the /etc/hosts file on the test machine.
Both dig domain.name and ping domain.name resolve to 10.20.1.1.
When testing from WAN (in front of OPNSense, behind pfSense):
My test machine gets an IP in the 10.10.1.xxx range from pfSense.
domain.name resolves either via pfSense DNS or the test machine's /etc/hosts.
Both dig domain.name and ping domain.name resolve to 10.10.1.99 (the OPNsense WAN IP).
The results of the connection tests I described in my original post still apply under this setup.