Netgate Discussion Forum
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Search
    • Register
    • Login

    IP dependent NAT forwarding

    Scheduled Pinned Locked Moved NAT
    2 Posts 2 Posters 1.4k Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • J
      jmiller31
      last edited by

      I'm just getting started with pfSense but really enjoying it so far. I'm configuring a test installation based on one of our production firewall routers and I've run into something I can't quite figure out how to do. It might be obvious and I'm just not seeing it.

      I need to be able to forward a port on the WAN to a different port on the internal NAT but the rule has to be based on the IP the person is coming from. For example:

      If a client comes in from A.A.A.A on port 22000 I want them to be forwarded to internal IP 192.168.1.10 and port 22. However if a client comes in from B.B.B.B on port 22000 I want them to be rejected. Then to take it one step further if C.C.C.C comes in from port 22000 I want them to forwarded to internal IP 192.168.50 and port 22 (or some other port).

      I've done this with iptables before so I know it's possible I just can't figure out how to do it with pfSense.

      Thanks,

      John

      1 Reply Last reply Reply Quote 0
      • D
        danswartz
        last edited by

        pf does support this, afaik, but i don't think the gui currently gives you the ability to check based on the source IP.

        1 Reply Last reply Reply Quote 0
        • First post
          Last post
        Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.