Rewrite an internal IP destination to an external IP destination

  • I have a weird "lab" request.  I test hardware that is designed to be locally connected to a machine that has a client installed. It will only talk to the server ( if the client ip is in that same subnet.

    client ip =
    server ip =
    This works no problem.

    The issue I have is I need the server to reside on another network accessible via public IP.  This is so I can test the software against the hardware that exists in a remote lab.  What i want to do is redirect all traffic destined for (internal) to (external).  The server will accept a connection from any ip address it is the client software that has a problem.

    Here is a rough diagram:

    Pfsense LAN GW
      | (public IP)
    remote FW (
    server (port forwarding setup to forward to

    I want to have pfsense take traffic destined for on the LAN interface and redirect to the external interface re-writing the destination to
    *caveat: the client software requires that the configured server address ( be a member of the local subnet on the machine.  in other words the client local adapter cannot be and the server be

  • At first you have to add the fictive server address to the pfSense LAN interface as an IP alias. Firewall > Virtual IP.

    Then add a port forwarding rule:
    interface: LAN
    Protocol: <set it="" to="" match="" your="" needs="">source:
    Destination port range: HTTPS
    Redirect target IP:
    Redirect target port: HTTPS

    That should work for you.</set>