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

    Port 80 not forwarding

    Scheduled Pinned Locked Moved NAT
    76 Posts 4 Posters 17.9k 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.
    • johnpozJ
      johnpoz LAYER 8 Global Moderator @Bob.Dig
      last edited by

      @bob-dig said in Port 80 not forwarding:

      do states really matter?

      Yes!!! States are evaluated before rules be it floating or on the 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 24.11 | Lab VMs 2.7.2, 24.11

      1 Reply Last reply Reply Quote 0
      • Bob.DigB
        Bob.Dig LAYER 8 @johnpoz
        last edited by

        @johnpoz Problem solved... 😥 There is one thing done before Firewall rules and that is portforwards and I had one I had forgotten, pointing to a machine but with no firewallrules....

        I could slap myself and I will, ty John for your patience.

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

          @bob-dig said in Port 80 not forwarding:

          pointing to a machine but with no firewallrules....

          That could cause it, but if you had no rule to allow it, it should of been logged by the default logging rule.

          But your floating rule to wan address, wouldn't of triggered because the forward to evaluated and said to send to some internal IP, on some other port even..

          edit: In all my years using pfsense and frequenting this board, when it comes to port forwarding. I can not recall an issue that was not PEBAC ;)

          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.7.2, 24.11

          Bob.DigB 1 Reply Last reply Reply Quote 1
          • Bob.DigB
            Bob.Dig LAYER 8 @johnpoz
            last edited by

            @johnpoz said in Port 80 not forwarding:

            That could cause it, but if you had no rule to allow it, it should of been logged by the default logging rule.

            That one I had disabled...

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

              @bob-dig said in Port 80 not forwarding:

              That one I had disabled...

              So it should of been caught by the default logging.. Do you have that turned off?

              When the state is being created, it still has to evaluate the rules to validate the traffic is allowed. If you had no rule to allow it, or the rule that allowed it was disabled then it should hit the default deny rule and be logged. Unless you disabled logging of the default deny.

              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.7.2, 24.11

              Bob.DigB 1 Reply Last reply Reply Quote 0
              • Bob.DigB
                Bob.Dig LAYER 8 @johnpoz
                last edited by Bob.Dig

                @johnpoz said in Port 80 not forwarding:

                Unless you disabled logging of the default deny.

                I have this off because of to much noise, my pfSense is exposed so there is a lot. But for error seeking I should remember to turn it on from now on.

                1 Reply Last reply Reply Quote 0
                • E
                  Elmojo @johnpoz
                  last edited by Elmojo

                  @johnpoz said in Port 80 not forwarding:

                  You don't need to have anything listening if your going to sniff to see if the traffic gets to psfense..

                  I done been hijacked! lol

                  I don't know what to tell you, but if I don't have anything running on my server to "accept" the packets (for lack of a better term), I get an instant 'connection refused' notice when I try the port check. If I start up SWAG or NPM, the port reads as open as expected.
                  I do see that you're referencing the packet sniffer, and I'm talking about the online port checker, so maybe we're talking about 2 different things?
                  All I know (very little!) is that my web services are not being exposed the way they're supposed to be, and I can't figure out why. It's really frustrating.
                  To be clear, I'm fairly sure it's an issue with the way I have things configured, not really a problem with pfsense, per se. As always, the issue is usually an ID10T-error. ;)

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

                    @elmojo said in Port 80 not forwarding:

                    I done been hijacked! lol

                    You mean on the thread you hijacked?

                    My point is about having anything "listening" to know if the packets get to you., You do not need anything listening to know if the packets get to pfsense wan. Which before anything can be forwarded or not.

                    You can validate that port xyz can get to my wan IP without anything having to accept it. Or that it be forwarded. You just need to sniff on your wan while you send the traffic - do you see it or not. If you do not see it then no pfsense can not do anything with it.

                    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.7.2, 24.11

                    E 1 Reply Last reply Reply Quote 0
                    • E
                      Elmojo @johnpoz
                      last edited by

                      @johnpoz said in Port 80 not forwarding:

                      You mean on the thread you hijacked?

                      Well, kinda, except that my post was several months after the last comment by the OP, so I felt pretty safe that I wasn't interrupting anything. lol

                      I see what you mean about sniffing the packets on the WAN, but that doesn't really tell me if the port is actually forwarded or not...does it? Only once I can run the port checker from an external web site and get an "okay, I see you" response, can I be sure it's really forwarded. At least that's the best I can do with my limited knowledge. I'm sure others (such as yourself) can check may other ways to see if the port is forwarding or not.
                      For those purposes, it seems that I must have a service running on my server side. I don't understand how that could be, maybe you can explain it? All I know is that it wasn't working until I turned on that docker, then it was. 🤷

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

                        @elmojo said in Port 80 not forwarding:

                        doesn't really tell me if the port is actually forwarded or not.

                        Nobody said it would.. But pfsense can not forward something it can not see. So if your having issues with port forwarding. Really the first thing to do is validate pfsense actually sees traffic to the port your wanting to forward.

                        okay, I see you" response,

                        Are you sure the answer came from you, or something upstream of pfsense? I could see one scenario right off the top.

                        You have a nat router in front of pfsense with its remote admin turned on, say port 443.. You go to can you see me, and check hey this IP im coming from, send syn to 443.. You get back OK, be pfsense never saw the traffic because your nat router in front of pfsense answered that, pfsense never saw it.

                        If you port forwarded something and its "NOT WORKING" then really the first thing to check is that pfsense actually saw the traffic in the first place. To check if pfsense can see inbound traffic to port xyz, you do not need anything listening or forwarded to check that aspect of it.

                        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.7.2, 24.11

                        E 1 Reply Last reply Reply Quote 0
                        • E
                          Elmojo @johnpoz
                          last edited by

                          @johnpoz
                          I think I get you, but the whole point of this exercise is to verify that the ports are indeed open to the internet, so that whatever I do next (say, publish a web site) will actually work. I've been able to validate that pfsense is indeed seeing the incoming traffic, using the methods you taught me. The only issue now is why I have to have a live service running on the "inside" (server) in order for that port check to work. That's what's baffling me. According to everything you've said, and what I've read online from other sources, that shouldn't be necessary.

                          As for the possibility of another device intercepting the traffic, I don't know what else it would be. The only thing plugged in upstream of my pfsense is my modem. It's a DSL router/modem, that's been bridged, so it really should be nothing but a simple modem at this point. I finally have pfsense accepting the PPPoE credentials, so I'm fairly sure that part if working. Is there a way to check that? The part about something else hijacking port 443, I mean.

                          Regardless, I am able to open both ports 80 and 443 successfully, IF I also spin up the container on my server that will use those ports, so the proceeding paragraph may be moot. lol

                          johnpozJ 1 Reply Last reply Reply Quote 0
                          • M
                            Mr Traxson
                            last edited by Mr Traxson

                            Wow, I kind of forgot about this thread sense I got really really sick with covid. after dying for about 4 weeks, I was able to get it working. It turned out pfsense was port forwarding properly, the testing websites I was using to see if the port forward was working was giving me false information. Pfsense works great, Port testing websites.. no so much. XD

                            E 1 Reply Last reply Reply Quote 0
                            • E
                              Elmojo @Mr Traxson
                              last edited by

                              @mr-traxson
                              Sorry to hear about your COVID battle. Glad you won! ;)
                              Which site(s) were you using to check ports?

                              M 1 Reply Last reply Reply Quote 0
                              • M
                                Mr Traxson @Elmojo
                                last edited by

                                @elmojo I was using https://portchecker.co/

                                E 1 Reply Last reply Reply Quote 0
                                • E
                                  Elmojo @Mr Traxson
                                  last edited by

                                  @mr-traxson
                                  Ah. Yeah, that one has lead me astray in the past as well. canyouseeme or yougetsignal are the ones I typically use.
                                  Glad to hear you got your issues all sorted out, both digital and medical. :)

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

                                    @elmojo said in Port 80 not forwarding:

                                    That's what's baffling me. According to everything you've said, and what I've read online from other sources, that shouldn't be necessary.

                                    Huh? I have no idea what your thinking... But to actually validate something got some traffic and ANSWERED it, you would have to have something listening for that traffic.

                                    You can check that pfsense saw the traffic, and you can validate pfsense sent that traffic on where you told it too (via sniff on the lan side port). As long as there is an IP that pfsense can arp for where your trying to send it.

                                    But if pfsense sends it on to that IP, and nothing listening there wouldn't be an answer.. Not unless the os is setup to send redirect, they nothing here listening on that IP. But normally OSes would not do that if the source IP is not local.. That bad to do if not a local IP.. Such a test is great that maybe your client your forwarding too is running a firewall, or its not using pfsense as its gateway, etc.

                                    You could validate that where you sent it got it via doing a sniff on that device. But if you want some outside testing site to say hey something answered - then yes something would have to answer.

                                    BTW testing UDP is going be nothing but problematic be it you have something answer or not - I wouldn't trust any outside testing site to give you a valid answer if your trying to test UDP.. You would need to see the sniff for the inbound traffic, and then see the outbound response..

                                    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.7.2, 24.11

                                    E 1 Reply Last reply Reply Quote 0
                                    • E
                                      Elmojo @johnpoz
                                      last edited by

                                      @johnpoz
                                      I didn't really follow most of that, sorry. I must be a bit slow this morning.

                                      So how does a port checker work under normal circumstances?
                                      Let's say I don't have a pfsense box at all. All I have is a normal home router, and a desktop PC. I want to play some game or whatever, and it requires a port to be open. I go into my router and forward that port via the GUI. I want to see if it worked, so I go to the canyousee web site and ask it to check that port. It says, "yep, that port is now open!". How does it do that? I've seen it work several times in the past. I've done it myself, long before I ever heard of pfsense. What was responding to the request from the port checker?
                                      I'm trying to learn the system here, so that next time something like this comes up, maybe I'll be slightly less dependent on help. :)

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

                                        @elmojo said in Port 80 not forwarding:

                                        So how does a port checker work under normal circumstances?

                                        It sends a SYN to the IP and port.. Does it get an SYN,ACK back - if so its open and working. If it doesn't get anything back its not working.

                                        So how could it validate if something is open if it doesn't get an answer to the syn? For something to answer the syn, it has to be listening on that port!

                                        edit: Here see I sent to some port, nothing listening.. But I can tell from sniff that port can get to me..

                                        noanswwer.jpg

                                        You can see that traffic is SYN sent to that IP and port

                                        syn.jpg

                                        Now if I send to something that is open..

                                        synack.jpg

                                        You see the syn,ack is sent back.. And then the closure of the connection.

                                        Might behoove you to do a bit of research of how tcp works, and what the handshake is when connections are being made and when they are closed, etc.

                                        here simple walk through of the handshake
                                        https://www.guru99.com/tcp-3-way-handshake.html

                                        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.7.2, 24.11

                                        E 1 Reply Last reply Reply Quote 0
                                        • E
                                          Elmojo @johnpoz
                                          last edited by

                                          @johnpoz
                                          Ok, thanks for the example. It actually illustrates my question pretty well.
                                          In your first set of images, the port is not forwarded (or is it? you didn't say) and nothing on your system is "listening", so the port checker comes back as closed. Okay, as expected.
                                          In the second set, you show that it receives an ACK response... from where? What sent that response? Do you have some service active on your system that's listening to that port specifically?
                                          This is what I'm trying to nail down. I fell like we're asking and answering different questions here...
                                          When I do a port check on a port that is forwarded in pfsense, but does not have any active service listening to that port on my server, I don't get a 'connection timeout' like you show in the first image. I get an immediate 'connection refused'. That leads me to believe that pfsense (or something on my server) is actively blocking that port, even though the rule is allowing it through the initial firewall. I'm trying to determine what that thing might be, or how to go about tracking it down. Does that make sense?

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

                                            @elmojo said in Port 80 not forwarding:

                                            the port is not forwarded (or is it? you didn't say)

                                            Its not forwarded but it doesn't matter if I forwarded it or not, if I forwarded to something that didn't answer it would be the same exact result.

                                            receives an ACK response... from where?

                                            From where I forwarded it answering.

                                            @elmojo said in Port 80 not forwarding:

                                            I get an immediate 'connection refused'

                                            Then your client you forwarded to sent back a RST.. Or you setup pfsense to do it.

                                            Here this is REFUSED, for that to show up something answered with a RST.. Either the rule you have on pfsense, something in front of pfsense or where you forwarded too.

                                            rst.jpg

                                            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.7.2, 24.11

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