Configuration for "route" <AnyLANIP> -> WANIP:WANPORT --NAT-> LANIP2:LANPORT

Started by le_top, November 24, 2023, 07:54:29 PM

Previous topic - Next topic
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 .



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].
Intel N100, 4 x I226-V, 16 GByte, 256 GByte NVME, ZTE F6005

1100 down / 800 up, Bufferbloat A+