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

    How to keep the webserver can be accessed from the internet?

    Scheduled Pinned Locked Moved NAT
    18 Posts 4 Posters 3.2k 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.
    • P Offline
      pfBasic Banned
      last edited by

      Create a Port alias = 53, 80, 443

      Create the following firewall rule for each webserver, or create an alias that includes both webservers.

      Untitled.png
      Untitled.png_thumb

      1 Reply Last reply Reply Quote 0
      • L Offline
        lordfurqon
        last edited by

        @pfBasic:

        Create a Port alias = 53, 80, 443

        Create the following firewall rule for each webserver, or create an alias that includes both webservers.

        I tried to make a rule to close the port 21 servers 192.168.200.3


        I try to scan 192.168.200.3

        port 21 is still open
        please correct and help, what perhaps I am wrong configuration?

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

          Where are you scanning from?  You understand pfsense has zero to do with communication between webserver 1 and 2.. They are on the same network.

          Rules are evaluated top down as the traffic enters an interface.  So if you want to stop something on the lan from talking to dmz or wan/internet then sure lan is the place to put them.  But its top down, first rule to fire wins - no other rules are evaluated.

          If you were scanning from WAN to lan.. Al traffic would be blocked out of the box..  Where are you scanning from exactly to where?

          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
          • L Offline
            lordfurqon
            last edited by

            @johnpoz:

            Where are you scanning from?  You understand pfsense has zero to do with communication between webserver 1 and 2.. They are on the same network.

            Rules are evaluated top down as the traffic enters an interface.  So if you want to stop something on the lan from talking to dmz or wan/internet then sure lan is the place to put them.  But its top down, first rule to fire wins - no other rules are evaluated.

            If you were scanning from WAN to lan.. Al traffic would be blocked out of the box..  Where are you scanning from exactly to where?

            I scan in one network with the webserver 192.168.200.3

            1 Reply Last reply Reply Quote 0
            • P Offline
              pfBasic Banned
              last edited by

              Try something like this to scan your WAN ports
              https://www.grc.com/x/ne.dll?bh0bkyd2
              Click "Proceed" then click "All Service Ports" Right now, unless you've written rules on WAN, they will all be closed.

              You'll need to write rules on WAN to open the specific ports you need to access your webservers.
              Write the rules you need then rescan and you will see them open.

              1 Reply Last reply Reply Quote 0
              • P Offline
                pfBasic Banned
                last edited by

                Read this:
                https://calvin.me/port-forward-web-servers-in-pfsense-2/

                1 Reply Last reply Reply Quote 0
                • L Offline
                  lordfurqon
                  last edited by

                  @pfBasic:

                  Try something like this to scan your WAN ports
                  https://www.grc.com/x/ne.dll?bh0bkyd2
                  Click "Proceed" then click "All Service Ports" Right now, unless you've written rules on WAN, they will all be closed.

                  You'll need to write rules on WAN to open the specific ports you need to access your webservers.
                  Write the rules you need then rescan and you will see them open.

                  rule on WAN

                  The scanning results

                  NAT configuration through the WAN interface of the free wifi. and pfsense I run in vmware.

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

                    @lordfurqon:

                    Pfsense has ZERO to do with those webservers talking to each other.

                    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
                    • L Offline
                      lordfurqon
                      last edited by

                      @pfBasic:

                      Read this:
                      https://calvin.me/port-forward-web-servers-in-pfsense-2/

                      I followed the tutorial so 192.168.200.3 accessible to the public, but instead can not access public 192.168.200.3.
                      if there is something wrong with my configuration? please correct




                      1 Reply Last reply Reply Quote 0
                      • L Offline
                        lordfurqon
                        last edited by

                        @johnpoz:

                        @lordfurqon:

                        Pfsense has ZERO to do with those webservers talking to each other.

                        Okay, I understand. thank you.
                        but I still have not read webserver public :D

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

                          Allowing access to pfsense web gui from the public internet is a BAD idea.. even if you change the port.

                          If you want your webservers to be available behind pfsense that would be a port forward.

                          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
                          • DerelictD Offline
                            Derelict LAYER 8 Netgate
                            last edited by

                            Source address WAN net is not the internet, it is the subnet of the WAN interface. Source any is the internet.

                            And the destination should be the INSIDE ADDRESS of the port forward. The REAL ADDRESS of the server, such as 192.168.200.3.

                            Chattanooga, Tennessee, USA
                            A comprehensive network diagram is worth 10,000 words and 15 conference calls.
                            DO NOT set a source address/port in a port forward or firewall rule unless you KNOW you need it!
                            Do Not Chat For Help! NO_WAN_EGRESS(TM)

                            1 Reply Last reply Reply Quote 0
                            • L Offline
                              lordfurqon
                              last edited by

                              @johnpoz:

                              Allowing access to pfsense web gui from the public internet is a BAD idea.. even if you change the port.

                              If you want your webservers to be available behind pfsense that would be a port forward.

                              yes I just tried that a publicly accessible webserver

                              1 Reply Last reply Reply Quote 0
                              • DerelictD Offline
                                Derelict LAYER 8 Netgate
                                last edited by

                                I merged these. Same topic. Also moving to NAT.

                                Chattanooga, Tennessee, USA
                                A comprehensive network diagram is worth 10,000 words and 15 conference calls.
                                DO NOT set a source address/port in a port forward or firewall rule unless you KNOW you need it!
                                Do Not Chat For Help! NO_WAN_EGRESS(TM)

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

                                  Did you forward the ports from the nat router in front of pfsense?  Pfsense can not forward something that never gets to it..

                                  If you can not figure what your doing wrong - look over the troubleshooting doc..
                                  https://doc.pfsense.org/index.php/Port_Forward_Troubleshooting

                                  If your trying to simulate coming from the internet by coming from the wan that is rfc1918.. Your going to have to make sure your uncheck block rfc1918 on the wan interface..

                                  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
                                  • L Offline
                                    lordfurqon
                                    last edited by

                                    @Derelict:

                                    I merged these. Same topic. Also moving to NAT.

                                    there a solution?

                                    1 Reply Last reply Reply Quote 0
                                    • L Offline
                                      lordfurqon
                                      last edited by

                                      @johnpoz:

                                      Did you forward the ports from the nat router in front of pfsense?  Pfsense can not forward something that never gets to it..

                                      If you can not figure what your doing wrong - look over the troubleshooting doc..
                                      https://doc.pfsense.org/index.php/Port_Forward_Troubleshooting

                                      If your trying to simulate coming from the internet by coming from the wan that is rfc1918.. Your going to have to make sure your uncheck block rfc1918 on the wan interface..

                                      OK I will try it

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