Restrict Port Forward Only From Certain Domains

  • I have a customer that I have just installed pfSense for. There is a need to forward incoming port 22 requests to an internal app server but only from a certain domain. In other words, if someone at issues a port 22 request to the company's network, it will get rejected. But if someone at issues the request they want the port forwarded to the app server.

    I have no problem getting all port 22 requests to get through to the app server but really need to restrict it to just those requests from

    Thanks in advance for any help.

  • LAYER 8 Netgate

    If you have a specific FQDN you can make an alias based on what that resolves to.  If they have static IP addresses you can make an alias of just their IP addresses.

    In general, pf uses IP addresses, not names so you need a way to get a list of the valid IPs.  Then just use those as source addresses for the port forward.

  • Just a suggestion, but it may be worth considering an OpenVPN link to bypass all this.

    If there are 15 random "Good Companys" then it might not be feasible, but if you're talking < 3 I think it would be worth the effort for the added security.

    Just my $.02

Log in to reply