I have OPNsense running on a Proxmox server where its WAN port has the WAN_IP directly (datacenter).
On the LAN network it's connected to a bridge where several containers and VMs are connected.
I have several NAT rules which allow a connection from the publlic network to a internal TCP Servirce I'll call LANIP2:LANPORT . The NAT rule works for WANIP:WANPORT to LANIP2:LANPORT .
(https://i.ibb.co/KhdC0Fj/image.png)
However when I try to connect from a machine on the internal network to WANIP:WANPORT, the NAT rule does not seem to apply - I can not connect. I can connect if I map the domain name to the internal IP, either in /etc/hosts or by mapping it to the local IP in unbound DNS running on OPNsense.
I would like to do properly though.
You can do that 2 ways:
1. Via split-horizon DNS
2. Via hairpinning
See [ur=https://forum.opnsense.org/index.php?topic=34925.0l]this[/url].