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

    Block outgoing connections ?

    Firewalling
    5
    15
    1.5k
    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.
    • L
      lbm_
      last edited by

      Hi

      If I read the documentation, it says several places that the interface rule tabs are only for ingoing connections, and not outgoing. For this reason blocking outgoing traffic should be done as floating rules.
      Ref:
      https://docs.netgate.com/pfsense/en/latest/firewall/firewall-rule-basics.html
      https://docs.netgate.com/pfsense/en/latest/book/firewall/floating-rules.html#direction

      I've done some testing, and I can for sure block outgoing traffic from the LAN interface, like so.
      How can this be ? I have for sure misunderstood something ?

      From the Firewall Rules LAN tab. This blocks access to the internet (and much more). As soon as the rule is disabled again, internet and the other stuff starts working again..

      Screenshot from 2019-11-18 19-29-07.png

      .. There is an allow all rule, right below this one.

      1 Reply Last reply Reply Quote 0
      • H
        heper
        last edited by

        Incoming traffic on lan is likely to become outgoing traffic on wan

        L 1 Reply Last reply Reply Quote 0
        • L
          lbm_ @heper
          last edited by

          @heper
          ? your post doesn't really make any sense ? :)

          H 1 Reply Last reply Reply Quote 0
          • H
            heper @lbm_
            last edited by

            @lbm_
            Untitled drawing.png

            and now ?

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

              Another image :

              My LAN IP :

              f7332595-c2ca-477f-a5bd-1a8107218dbd-image.png

              My IP has two IP's : an IPv4 and IPv6.

              I'll block them on the LAN firewall page :

              5d072633-f997-4536-ab78-d186f6327ded-image.png

              Nothing special on this tab, just de classic anti lockout rule, two pfBlockerNG rules my two "test block rules" and a final pass all rule.

              When I hit the green button (Apply Change) my PC can still access the pfSense GUI ...... because states are still up.
              So, I reset states :

              7e1d3238-c48d-40b1-9b72-35918b5ebe4e-image.png

              After that, the browser hangs .... My PC has no IPv4 / IPv6 so everything came to a halt (note ICMP still passes ^^).
              I block all connections going into the LAN interface.
              Local LAN traffic is still possible of cours, that traffic isn't seen by pfSense.

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

              1 Reply Last reply Reply Quote 0
              • L
                lbm_
                last edited by

                Yes, but what exactly has this to do with my rule, i've created ?

                From the docs:
                "Floating rules are not limited to the inbound direction like interface rules"

                The rule is created on the LAN interface with any as the destination ? So because the traffic comes back, it "automatically" becomes an inbound rule ?

                1 Reply Last reply Reply Quote 0
                • kiokomanK
                  kiokoman LAYER 8
                  last edited by kiokoman

                  " you have for sure misunderstood something"
                  you never use floating rules if not in a realy not common scenario
                  "only for ingoing connections, and not outgoing" where did you read this?
                  rules for LAN interface go on the LAN tab and they are needed for outgoing traffic for sure

                  ̿' ̿'\̵͇̿̿\з=(◕_◕)=ε/̵͇̿̿/'̿'̿ ̿
                  Please do not use chat/PM to ask for help
                  we must focus on silencing this @guest character. we must make up lies and alter the copyrights !
                  Don't forget to Upvote with the 👍 button for any post you find to be helpful.

                  L 1 Reply Last reply Reply Quote 0
                  • L
                    lbm_ @heper
                    last edited by

                    This post is deleted!
                    1 Reply Last reply Reply Quote 0
                    • L
                      lbm_ @kiokoman
                      last edited by

                      @kiokoman
                      Yes, its highly likely :)

                      E.g. here:
                      https://docs.netgate.com/pfsense/en/latest/book/firewall/floating-rules.html#direction
                      It states "Floating rules are not limited to the inbound direction like interface rules. "

                      And here:
                      https://docs.netgate.com/pfsense/en/latest/firewall/firewall-rule-basics.html
                      "Firewall rules on Interface and Group tabs process traffic in the Inbound direction and are processed from the top down,"

                      1 Reply Last reply Reply Quote 0
                      • JeGrJ
                        JeGr LAYER 8 Moderator
                        last edited by

                        Both statements are right. Nevertheless you only use floating rules if you absolutely need them. Otherwise it's simply not necessary to filter the traffic going out one interface if you just filtered it before it got IN on the other side. That's why pfSense Docs states that it filters inbound on all interfaces.

                        So what's your point or what are you missing to understand how to create rules? I still don't get your OP?

                        Don't forget to upvote 👍 those who kindly offered their time and brainpower to help you!

                        If you're interested, I'm available to discuss details of German-speaking paid support (for companies) if needed.

                        1 Reply Last reply Reply Quote 0
                        • kiokomanK
                          kiokoman LAYER 8
                          last edited by kiokoman

                          ok first, forget about floating rules, never use it
                          inbound = traffic generated by your clients are entering the LAN interface and going out from LAN to internet

                          ̿' ̿'\̵͇̿̿\з=(◕_◕)=ε/̵͇̿̿/'̿'̿ ̿
                          Please do not use chat/PM to ask for help
                          we must focus on silencing this @guest character. we must make up lies and alter the copyrights !
                          Don't forget to Upvote with the 👍 button for any post you find to be helpful.

                          L 1 Reply Last reply Reply Quote 1
                          • L
                            lbm_ @kiokoman
                            last edited by

                            @kiokoman said in Block outgoing connections ?:

                            ok first, forget about floating rules, never use it
                            inbound = traffic generated by your clients are entering the LAN interface and going out from LAN to internet

                            Aaaaah, yes. That explanation, for the stupid people, like me, makes sense. Thank you! 😃

                            I was thinking it like this.. 🤦 , which are obviously wrong..
                            inbound -> to LAN network
                            outbound -> from LAN network to X ....

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

                              @lbm_ said in Block outgoing connections ?:

                              outbound -> from LAN network to X ....

                              👍

                              Now review my post above, and try t block yourself ....
                              You'll see, it works.
                              ( have another PC (IP) ready to unblock )

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

                              L 1 Reply Last reply Reply Quote 0
                              • L
                                lbm_ @Gertjan
                                last edited by

                                @Gertjan said in Block outgoing connections ?:

                                @lbm_ said in Block outgoing connections ?:

                                outbound -> from LAN network to X ....

                                👍

                                Now review my post above, and try t block yourself ....
                                You'll see, it works.
                                ( have another PC (IP) ready to unblock )

                                Yes, thats easy, and got it working, and that was the part which I do not really understood why i really did work, because I was not understanding the terms af "inbound" correctly.

                                1 Reply Last reply Reply Quote 0
                                • JeGrJ
                                  JeGr LAYER 8 Moderator
                                  last edited by

                                  It's a bit tricky at first but just think about the pfSense Box as some sort of blackbox with lines going into it. WAN being one, LAN being another. Filtering is done "inbound" so whereever a packet "touches" the blackbox first, that's where you should filter it (pass/block etc.) :)

                                  Don't forget to upvote 👍 those who kindly offered their time and brainpower to help you!

                                  If you're interested, I'm available to discuss details of German-speaking paid support (for companies) if needed.

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