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

    [Solved] Port 53, 80, 443 always open on all interfaces

    Scheduled Pinned Locked Moved Firewalling
    38 Posts 7 Posters 9.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.
    • GrimsonG
      Grimson Banned
      last edited by

      Make sure WLAN is disabled on your phone when you test. If the ports are open then you must have created rules that allow incoming connections. Post screenshots of your WAN and floating rules.

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

        @Grimson:

        Make sure WLAN is disabled on your phone when you test.

        Yes, sure. I take care of that, otherwise I would scan from the LAN.

        @Grimson:

        If the ports are open then you must have created rules that allow incoming connections. Post screenshots of your WAN and floating rules.

        My feeling is, it's opened by a service or services and I don't see it on the GUI. (DNS Forwarder and WebConfigurator for example). Btw, I checked DNS forwarder to use only the LAN interface.

        Thanks a lot for your effort reviewing my problem.

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

          @Grimson:

          Post screenshots of your WAN and floating rules.

          Added screenshots about Outbound NAT and Port Frowards as well.
          1:1 and NPt are empty.

          FW_Rules_Floating_Rules.PNG
          FW_Rules_Floating_Rules.PNG_thumb
          FW_Rules_WAN_interface.PNG
          FW_Rules_WAN_interface.PNG_thumb
          FW_Rules_VPN_US_interface.png
          FW_Rules_VPN_US_interface.png_thumb
          FW_PortForwards.PNG
          FW_PortForwards.PNG_thumb
          FW_NAT_Outbound.PNG
          FW_NAT_Outbound.PNG_thumb

          1 Reply Last reply Reply Quote 0
          • C
            conor
            last edited by

            I got caught with this once before where there was a pre existing state entry in the state table for my test before i changed the firewall rules. Can you check your state table and delete any states to those ports and test again?

            200+ pfSense installs - best firewall ever.

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

              @conor:

              Can you check your state table and delete any states to those ports and test again?

              Tried a state reset, but did not help. Anyway, thanks for the hint.

              Did a fresh portscan on WAN, VPN_US and VPN_HU public IPs, seems the WAN and VPN_HU IPs did not have 53 open anymore.

              Current status:

              WAN, Open ports: 80, 443
              VPN_US, Open ports: 53, 80, 443
              VPN_HU, Open ports: 80, 443

              Opening the public IPs from external browser:

              WAN, http/80: timeout
              WAN, https/443: pfSense login page
              VPN_US, http/80: 403 Forbidden, error page from nginx, see screenshot
              VPN_US, https/443: browser error: ERR_CONNECTION_CLOSED
              VPN_HU, http/80: 403 Forbidden, error page from nginx, see screenshot
              VPN_HU, https/443: browser error: ERR_CONNECTION_CLOSED

              Portscan_WAN_IP.png
              Portscan_WAN_IP.png_thumb
              Portscan_VPN_US_IP.png
              Portscan_VPN_US_IP.png_thumb
              Portscan_VPN_HU_IP.png
              Portscan_VPN_HU_IP.png_thumb
              http80_external_browser.PNG
              http80_external_browser.PNG_thumb

              1 Reply Last reply Reply Quote 0
              • KOMK
                KOM
                last edited by

                By default, nothing is open on WAN unless you open it up yourself.  You don't need to add specific block rules since all traffic is blocked unless there is an explicit allow rule.  If a scan of your IP always shows open ports for 80,443 then I would tend to believe that it's hitting your ISP's equipment somehow.  Easy enough to do a packet capture on WAN while scanning it and look at the traffic in Wireshark.  Running nmap to fingerprint it might also be helpful if it exposes what kind of device is responding.

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

                  If you are getting a response into WAN from the outside on 443 then you have a rule passing the same. Period.

                  You're not getting any weird "Can't load rules" errors or anything are you?

                  Here's what I would do:

                  Figure out whatever address you are hitting pfSense from, packet capture on WAN filtered on that address and test again. While you're testing also look at the states filtered on that address. See what it's really doing.

                  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
                  • GrimsonG
                    Grimson Banned
                    last edited by

                    You can check the full pf ruleset: https://doc.pfsense.org/index.php/How_can_I_see_the_full_PF_ruleset

                    Did you enable UPnP & NAT-PMP?

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

                      @KOM:

                      By Running nmap to fingerprint it might also be helpful if it exposes what kind of device is responding.

                      Understand, but it's not a question what's responding as I see the pfSense login screen if I open https://WANIP from a foreign browser.

                      Capture might be helpful to see what's the situation on the VPN_US IP, as this is the only one which respond to port 53.

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

                        @Grimson:

                        Did you enable UPnP & NAT-PMP?

                        No, never touched that. Just checked it under Status - UPnP & NAT-PMP, it's disabled.

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

                          @Derelict:

                          If you are getting a response into WAN from the outside on 443 then you have a rule passing the same. Period.
                          You're not getting any weird "Can't load rules" errors or anything are you?

                          I did a week ago, but it's disappeared by setting this value to 400 000:
                          System -> Advanced -> Firewall & NAT -> Maximum Table Entries

                          Read on the forum somewhere, that's the solution. I have no error since then.

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

                            @Derelict:

                            Figure out whatever address you are hitting pfSense from, packet capture on WAN filtered on that address and test again. While you're testing also look at the states filtered on that address. See what it's really doing.

                            • Switched to the GSM network again from my phone and checked my public IP
                            • Started a packet capture on WAN with filling the IP above to Host Address.
                            • Ran a portscan from the phone on 443 only

                            Result:

                            16:55:59.218056 IP PHONEPUBLICIP.54409 > WANIP.443: tcp 0
                            16:56:00.219797 IP PHONEPUBLICIP.54409 > WANIP.443: tcp 0
                            16:56:02.226128 IP PHONEPUBLICIP.54409 > WANIP.443: tcp 0

                            1 Reply Last reply Reply Quote 0
                            • KOMK
                              KOM
                              last edited by

                              I see the pfSense login screen if I open https://WANIP from a foreign browser.

                              While on LAN or WAN?  If you are on LAN and access your public address in a browser, pfSense will give you the GUI even though it isn't accessible from WAN.

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

                                @KOM:

                                While on LAN or WAN?

                                While I'm on WAN on a very different network. So Webconfigurator is exposed to WAN attacks at the moment which really concerns me. I will put WebConfigurator to another port to decrease the risk as 80 and 443 are open from WAN.

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

                                  That packet capture shows nothing but SYNs.

                                  Again, if you can get to the WebGUI you have a rule passing the traffic.

                                  Look at the states. See what's really happening.

                                  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
                                    johnpoz LAYER 8 Global Moderator
                                    last edited by

                                    If he was getting to his gui from his wan, then his packet capture would show answer, ie syn,ack - like derelict says it only shows syn…

                                    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 24.11 | Lab VMs 2.8, 24.11

                                    1 Reply Last reply Reply Quote 0
                                    • KOMK
                                      KOM
                                      last edited by

                                      I'm wondering if he's got the bogonsv6 issue and his ruleset has failed to load?

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

                                        I'm wondering if he's got the bogonsv6 issue and his ruleset has failed to load?

                                        Already covered.

                                        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
                                        • D
                                          dean2028
                                          last edited by

                                          @johnpoz:

                                          If he was getting to his gui from his wan, then his packet capture would show answer, ie syn,ack - like derelict says it only shows syn…

                                          That test with the capture was just a port scan from the mobile phone to WAN IP. There was no Webconfig access from the browser on https://WANIP.  I'm going to do additional tests now.

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

                                            Dude if you send a syn, you would get back a syn,ack if anything was listening o that port.  That is how it works.

                                            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 24.11 | Lab VMs 2.8, 24.11

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