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

    Need some routing assistance with pfSense, DMZ and WebSite

    Scheduled Pinned Locked Moved General pfSense Questions
    30 Posts 4 Posters 1.0k 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.
    • stephenw10S
      stephenw10 Netgate Administrator
      last edited by

      Still my advise is to check the state table in Diag > States whilst trying to connect.

      That will show you if the traffic even arrives at pfSense and if it does then if it's forwarded correctly.

      I 1 Reply Last reply Reply Quote 0
      • I
        ILO_EWS @stephenw10
        last edited by

        @stephenw10 said in Need some routing assistance with pfSense, DMZ and WebSite:

        Still my advise is to check the state table in Diag > States whilst trying to connect.

        The traffic seems to arrive correctly. The web server has IP 192.168.200.2 (DMZ IP).
        bc4d63b3-85e5-4f9c-8f8e-1154e6572644-image.png

        As the pfsense is connected to my ISP router, all traffic from 443 are redirected to port 443 on PfSense IP. Is it good ?

        Many thanks in advance.

        stephenw10S 1 Reply Last reply Reply Quote 0
        • stephenw10S
          stephenw10 Netgate Administrator
          last edited by

          OK that's all outbound traffic from the server in the DMZ.

          Set interfaces to All there.

          Add 192.168.200.2 to the Filter field and then check for states whilst you're trying to connect externally.

          You should see states on WAN and DMZ for that incoming traffic.

          I 2 Replies Last reply Reply Quote 0
          • I
            ILO_EWS @stephenw10
            last edited by

            @stephenw10 Find below traffic.
            0aeb6900-c92c-4237-a74a-5afcb0fb8e35-image.png

            Is it possible to have the same view with dateTime ?

            I don't know if it's important but my web site use php technology.

            Best regards

            1 Reply Last reply Reply Quote 0
            • stephenw10S
              stephenw10 Netgate Administrator
              last edited by

              Ok that shows NAT works outbound but those are still all outbound states.

              Were you testing from some external device at the time? If so it looks like incoming traffic is not being passed to pfSense.

              1 Reply Last reply Reply Quote 0
              • I
                ILO_EWS @stephenw10
                last edited by

                @stephenw10 Find below traffic.
                0aeb6900-c92c-4237-a74a-5afcb0fb8e35-image.png

                Is it possible to have the same view with dateTime ?

                I don't know if it's important but my web site use php technology.

                Best regards

                johnpozJ 1 Reply Last reply Reply Quote 0
                • stephenw10S
                  stephenw10 Netgate Administrator
                  last edited by

                  Ok, try this: Filter by the external IP address you are testing from instead. You should see that traffic open states inbound.

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

                    @ILO_EWS this tells me your behind a double nat

                    doublenat.jpg

                    Your lan traffic going out the wan was natted to a 192.168.95.239 address, your wan IP.. So if you want to forward something from out on the internet to something behind pfsense you would first have to forward on whats in front of pfsense to pfsense wan IP.

                    From your own statement, your clearly behind a double nat

                    Internet <--> Router 192.168.95.0/24 <--> pfSense <--> LAN 192.168.77.0/24

                    On that router that is connected to the internet, you need to forward whatever traffic you want to get to something behind pfsense to pfsense wan, from your state table that would be the 192.168.95.239 IP.

                    Then on pfsense you forward to what is behind pfsense. But until you forward on your router - pfsense isn't ever going to see anything to 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 24.11 | Lab VMs 2.8, 24.11

                    1 Reply Last reply Reply Quote 0
                    • stephenw10S
                      stephenw10 Netgate Administrator @ILO_EWS
                      last edited by

                      @ILO_EWS said in Need some routing assistance with pfSense, DMZ and WebSite:

                      As the pfsense is connected to my ISP router, all traffic from 443 are redirected to port 443 on PfSense IP.

                      As long as that's true it should work.

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

                        @stephenw10 if that was true then he would see that traffic hit his pfsense wan, be it he had any ports working or not via sniff.

                        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

                        I 1 Reply Last reply Reply Quote 1
                        • I
                          ILO_EWS @johnpoz
                          last edited by

                          @johnpoz
                          So in this case, do you think that the problem is on the configuration of my ISP routeur ?
                          Best regards

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

                            @ILO_EWS go to like can you see me . org and send some traffic to 443 while you're doing a packet capture on pfsense for your wan IP and port 443 do you see anything with destination of pfsense IP to 443..

                            if pfsense doesn't see inbound to its 443 then no it can not forward anything.. Also that any any rule isn't right.. When you create your port forward it should auto create your wan firewall rule to allow 443 to your host your forwarding to IP.

                            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

                            I 1 Reply Last reply Reply Quote 0
                            • I
                              ILO_EWS @johnpoz
                              last edited by

                              @johnpoz said in Need some routing assistance with pfSense, DMZ and WebSite:

                              go to like can you see me . org and send some traffic to 443 while you're doing a packet capture on pfsense for your wan IP and port 443 do you see anything with destination of pfsense IP to 443..

                              if pfsense doesn't see inbound to its 443 then no it can not forward anything.. Also that any any rule isn't right.. When you create your port forward it should auto create your wan firewall rule to allow 443 to your host your forwarding to IP.

                              When I launch a test on this website, this error appear
                              Error: I could not see your service on 82.66.xxx.xxx on port (443)
                              Reason: Connection timed out

                              Best regards

                              johnpozJ GertjanG 2 Replies Last reply Reply Quote 0
                              • johnpozJ
                                johnpoz LAYER 8 Global Moderator @ILO_EWS
                                last edited by johnpoz

                                @ILO_EWS but that doesn't tell you if even got to pfsense.. You need to do a packet capture to see if it even got to pfsense, or yeah no duh its not going to work and yeah it would time out.

                                edit: example... I don't have anything listening on 666, no forwards, etc.. but if I send traffic pfsense still sees it.. And yeah since no answer it would time out

                                capture.jpg

                                edit: what does your router in front of pfsense show for its wan, for all we know its a cgnat IP and no forwards are ever going to work.

                                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

                                I 1 Reply Last reply Reply Quote 1
                                • stephenw10S
                                  stephenw10 Netgate Administrator
                                  last edited by

                                  Yup, the result is not important. The test is that the traffic arrives at the pfSense WAN. So in the pcap as suggested or openning states in the state table.

                                  1 Reply Last reply Reply Quote 0
                                  • GertjanG
                                    Gertjan @ILO_EWS
                                    last edited by

                                    @ILO_EWS
                                    and @stephenw10 :
                                    Something did come on :

                                    2f9ab7b0-51d6-43bc-8f44-029111f60c87-image.png

                                    The first rule - that should have been removed by now - clearly shows TCP traffic was entering = coming from the Internet.
                                    With that first rule removed, the second and third now have chance to work.

                                    so I presumed : no cgnat horrors.

                                    When testing, the counters "0/0 B" should not stay at 0/0. 0/0 means nothing arrivd at the WAN interface that matches the rule.
                                    For fast NAT, or whatever, testing, no need to packet capture, or look at the state table : look at your firewall rues, and see if they get used/applied.

                                    Also, ISP router, the one in front of pfSEnse, can have DMZ look alike options.
                                    Don't use them.
                                    Handle incoming incoming connection the old classic way :
                                    You have to NAT a port (for your web server who lives at the network called DMZ) on pfSense.
                                    You have to do the same thing on the ISP router : NAT that port to the pfSense WAN IP.

                                    No "help me" PM's please. Use the forum, the community will thank you.
                                    Edit : and where are the logs ??

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

                                      @Gertjan said in Need some routing assistance with pfSense, DMZ and WebSite:

                                      so I presumed : no cgnat horrors.

                                      While that a good observation - you don't know what else on that transit network between his router and pfsense could be sending traffic.. He has removed the block rfc1918 so that could be traffic from pretty much anything.

                                      I agree that rule shouldn't be there for sure.

                                      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

                                      I 1 Reply Last reply Reply Quote 0
                                      • I
                                        ILO_EWS @johnpoz
                                        last edited by

                                        @johnpoz
                                        Excuse me but in what part of pfsense configuration could i sée this traffic.
                                        Indeed, i dont found something liké that.
                                        Best regards

                                        1 Reply Last reply Reply Quote 0
                                        • I
                                          ILO_EWS @johnpoz
                                          last edited by

                                          @johnpoz said in Need some routing assistance with pfSense, DMZ and WebSite:

                                          rfc1918

                                          In défaut configuration i never has a rules with rfc1918, may I add one ?
                                          Best regards

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

                                            @ILO_EWS the wan interface out of the box would always have a block rfc1918 rule.. Maybe they changed something that if your wan was rfc1918 to not add it, but unlikely - and there would be normally the block bogon rule as well..

                                            So either that isn't your wan interface actually, and you renamed it to wan? But wan interfaces default to have a block rfc1918 and bogon.

                                            You must of turned them off??

                                            rfc.jpg

                                            you don't really need those, especially if your behind a nat already - but odd that they are not listed? Packet capture would be under the diagnostic menu

                                            packetcap.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.8, 24.11

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