Nat on firewall interface to other internal host?

  • I know this is kind of funny, but I would like to nat an ip address (my firewalls lan interface in this case) to another internal host on my lan. The nat rule would look something like:

    my pc –--  firewall:5555 ---- internal host:22

    So I would like to take traffic destined for the lan interface of the firewall on port 5555 and redirect it to host x.x.x.x on port 22. I tried using nat rules, and saw packets going out and being natted correctly, but never saw traffic on destination machine. Is there a problem with same interface nat?


  • LAYER 8 Global Moderator

    For what possible reason would you want or need this?

    Just go directly to internal host:22, at a loss to why you would want to hit 5555 an any internal IP on your lan just to get directed to some other internal lan IP on a different port?

    Talk about violation of the KISS principle ;)

  • This can only work if the internal host is on a different subnet than the rest of the LAN, such as if your LAN is and you want to access a randomly plugged-in device with a default IP address of

    Create a Virtual IP address alias of (254 is probably unused and won't conflict with the plugged-in device). Then create a manual NAT rule for the LAN interface from your LAN subnet to Make sure you also have a firewall rule on the LAN interface that allows traffic from anywhere to

    Now you can directly access the device from any of your LAN clients by simply typing You can also optionally create a port forward to access it via firewall:port.

    Note that if the device has RIP enabled on its LAN interface, and you have RIP enabled on pfSense, you don't need to create the NAT rule. Simply plugging in the device will automatically make it accessibe on your LAN via if pfSense has a virtual IP address in the same subnet as the device.

Log in to reply