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

    Can I setup and Firewall Rule and NAT Rule for this.

    Scheduled Pinned Locked Moved Firewalling
    3 Posts 3 Posters 1.6k 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.
    • D Offline
      dgarratt
      last edited by

      My pfSense server is setup with 2 web servers protected by it. For the sake of example let me say that the lan addresses of the servers are as follows

      pfsense 192.168.1.1
      web1    192.168.1.4
      web2    192.168.1.5

      The wan address for the pfsense server could be 5.4.3.1

      I would like to be able to access either server using different url/ports but I'm confused about the syntax of the url and what it would actually mean to pfsense.

      For web1 I would try and access from the internet using the url https://5.4.3.1:10001
      and for web2 I would use the url https://5.4.3.1:10002

      Now both are using https which is port 443 - but then we have the suffix 10001 and 10002 which I'm not sure helps me or not ?

      Can I distinguish between these two incoming connections and forward/nat them to the different servers web1 and web2

      I have experimented with no joy - can someone let me know if this is possible or would I have to start reading up on proxy servers.

      Thanks

      Dave

      1 Reply Last reply Reply Quote 0
      • marcellocM Offline
        marcelloc
        last edited by

        You can do this with port forwarding (firewall-> nat)

        Treinamentos de Elite: http://sys-squad.com

        Help a community developer! ;D

        1 Reply Last reply Reply Quote 0
        • johnpozJ Offline
          johnpoz LAYER 8 Global Moderator
          last edited by

          sure just forward 10001 to web1 ip on port 443

          then forward 10002 to web2 ip port 443

          This is done under your nat rules, and then just let it create the firewall rules for you.

          An intelligent man is sometimes forced to be drunk to spend time with his fools
          If you get confused: Listen to the Music Play
          Please don't Chat/PM me for help, unless mod related
          SG-4860 25.07.1 | Lab VMs 2.8, 25.07.1

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