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

    DNS panflully slow when running Egress rules on LAN?

    Scheduled Pinned Locked Moved Routing and Multi WAN
    8 Posts 3 Posters 838 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.
    • Cool_CoronaC
      Cool_Corona
      last edited by

      I am getting very slow browsing and DNS with Egress rules in place.

      Everything is lightning fast when allow all is at the top.

      Kind of annoying.....

      Any suggestions?

      bingo600B 1 Reply Last reply Reply Quote 0
      • bingo600B
        bingo600 @Cool_Corona
        last edited by bingo600

        @cool_corona
        Suggestion ....
        Use Reject instead of Block in the rule's top "Action".
        Should send an immediate "Reset" instead of "Drop" and wait for TCP timeout.

        You would normally only use Reject on "Inside interfaces" (non public) , as it would also speed up an attacker's portscan, on the wan interface.

        By egress , do you mean floating rules ?

        /Bingo

        If you find my answer useful - Please give the post a šŸ‘ - "thumbs up"

        pfSense+ 23.05.1 (ZFS)

        QOTOM-Q355G4 Quad Lan.
        CPUĀ  : Core i5 5250U, Ram : 8GB Kingston DDR3LV 1600
        LANĀ  : 4 x Intel 211, DiskĀ  : 240G SAMSUNG MZ7L3240HCHQ SSD

        Cool_CoronaC 1 Reply Last reply Reply Quote 0
        • Cool_CoronaC
          Cool_Corona @bingo600
          last edited by

          @bingo600

          Only running on specific interface for testing purposes.

          After applying the Egress rules, only cached requests are fast. New requests takes 3-5 seconds to reply.

          eadf6db8-560b-4f14-ab4e-fbef49ecb6fa-billede.png

          This is the Egress rules.

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

            @cool_corona egress rules on the lan? Did you create egress (outbound) rules in floating?

            All rules are evaluated inbound into an interface from the network the interface attached too, those would be ingress rules..

            Use of the term egress you mean leaving the lan network.. but the rules would be ingress into the interface.

            So your doing dns interception, that is the only way that 1st rule makes sense, you really should have tcp as well - dns can use udp and tcp.

            Your second rule for 853 would always be TCP, and you have it only for udp.. Did you actually setup unbound for tls queries to it, what cert did you setup that your clients dns client is going to trust?

            Your ntp rule you have as tcp, but ntp is never tcp it is always udp.

            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

            Cool_CoronaC 1 Reply Last reply Reply Quote 1
            • Cool_CoronaC
              Cool_Corona @johnpoz
              last edited by

              @johnpoz Thanks.

              I will change it and test. I block DNS over TLS.

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

                @cool_corona said in DNS panflully slow when running Egress rules on LAN?:

                I block DNS over TLS.

                Not in your rules you don't Why would you have the 853 allow rule as an interception rule if your blocking? Unless since your not actually listening it wouldn't work anyway so that is block?

                Is your client trying to do that and its waiting for timeout, before it does a normal dns query? But I don't see any hits on the 853 rule, and the normal dns udp rule looks like really no hits either 6 KB? But maybe you have a rule above that allows directly to pfsense and that is only your redirection.

                When posting rules it very helpful to show the headers, so you know for sure there are no rules above, and also show floating or specifically state you have no rules in the floating tab, etc.

                example - from this posting you can see very clear what interface the rules are on, and that your seeing the full rule listing, etc..

                rules.jpg

                Your rules you have * as source - why would that not be lan net? Are you using lan as transit and have downstream networks.. But since you don't even call out the source network, and don't show the headers - have really no idea if those rules are your lan, or some other interface - maybe even floating tab?

                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

                Cool_CoronaC 1 Reply Last reply Reply Quote 0
                • Cool_CoronaC
                  Cool_Corona @johnpoz
                  last edited by

                  @johnpoz Followed your example. Better?

                  Seems to have picked up significantly speedwise....

                  72a2f989-c49b-4b83-8aa0-4f6de4144424-billede.png

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

                    @cool_corona blocking bogon on a lan side interface is normally never a good idea.. That rule is not a destination rule that is a source rule. How would you have source traffic coming into your interface with a bogon source?

                    And if your rules limit to the net your on, say lan net then the default deny would stop anything with a bogon source anyway.

                    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.