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

    Aliases with FQDN not working in pFsense 2.7 CE or Plus 23.05.01

    Scheduled Pinned Locked Moved Firewalling
    19 Posts 5 Posters 1.8k 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.
    • T
      the_driver_123
      last edited by

      Dear,
      after updating both the CE and PLUS versions to the latest version we noticed that the firewall rules that use ALIAS FDQN no longer work correctly. Only aliases with IP / Network work. Those with Alias ​​do not allow the rule to generate traffic. For example: if I create an ALIAS with the following FQDN - e.g. download.docker.com - ​​and assign it to a firewall rule to enable HTTPS access for a particular server, this does not work. Outgoing browsing is blocked for everyone. Pfsense correctly resolves DNS (I have internal DNS) and public ones in fallback.

      M 1 Reply Last reply Reply Quote 0
      • M
        michmoor LAYER 8 Rebel Alliance @the_driver_123
        last edited by

        @the_driver_123 show us your firewall rules.
        Also what do the firewall logs show? Is the rule being matched?

        Firewall: NetGate,Palo Alto-VM,Juniper SRX
        Routing: Juniper, Arista, Cisco
        Switching: Juniper, Arista, Cisco
        Wireless: Unifi, Aruba IAP
        JNCIP,CCNP Enterprise

        1 Reply Last reply Reply Quote 0
        • T
          the_driver_123
          last edited by the_driver_123

          Dear, for example

          One of the server (10.99.1.8) have to connect to download.docker.com:443
          download.docker.com is resolved (from my pc ) as
          13.226.244.77
          13.226.244.123
          13.226.244.48
          13.226.244.19

          My pc and the server is using the same DNS server. Also the pfSense appliance.

          Currently this server is unable to reach the web site (curl https://download.docker --> Time Out)

          From PFSENSE I can see

          DENY Aug 8 12:17:28 DMZ 10.99.1.8:52756 13.226.244.123:443 TCP:S
          1345006f-f1cd-4dba-b5fa-8147e86b76aa-image.png

          The Alias FQDN is created:

          1f0ff07b-f134-4e87-b265-e967a847e151-image.png

          Next, the Firewall rule

          36a00b54-9a9f-4b82-b2c4-89d25dbcd930-image.png

          Table Logs

          34135918-cabf-409f-b0b0-7462e6922238-image.png

          No traffic is generated

          775ad6be-11d0-49fd-9e65-389269207dd5-image.png

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

            @the_driver_123 well if the table has any entries - then no the rule wouldn't work.

            But I created the same alias - and table populates just fine here.

            docker.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

            1 Reply Last reply Reply Quote 0
            • T
              the_driver_123
              last edited by

              Still empty
              44d17a93-99cd-4bab-a03e-cdc2ff6230ac-image.png

              Why no entries are defined?
              How I can check this ?

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

                @the_driver_123 table will not populate until it is actually in a rule. on pfsense does that fqdn resolve - what does the output of dns diag show

                dns.jpg

                its possible your having an issue resolving the cname, which is what that fqdn points too

                ;; QUESTION SECTION:
                ;download.docker.com.           IN      A
                
                ;; ANSWER SECTION:
                download.docker.com.    3600    IN      CNAME   d2h67oheeuigaw.cloudfront.net.
                d2h67oheeuigaw.cloudfront.net. 3600 IN  A       99.84.160.46
                d2h67oheeuigaw.cloudfront.net. 3600 IN  A       99.84.160.75
                d2h67oheeuigaw.cloudfront.net. 3600 IN  A       99.84.160.77
                d2h67oheeuigaw.cloudfront.net. 3600 IN  A       99.84.160.92
                

                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
                • T
                  the_driver_123
                  last edited by the_driver_123

                  Ok but the object is currently used in a rule

                  I dont understand

                  Also, pfsense is able to resolve

                  3033902a-c1a3-4cf4-ac2a-7de4d6bc9fd2-image.png

                  a4980eb9-7e74-40ac-9d38-f6134510f7df-image.png

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

                    @the_driver_123 ok if pfsense is able to resolve it - then its not a dns related issue, and something with the filter mech.. those aliases get updated by default ever 5 minutes.. Do you show filterdns running?

                    Possible this?

                    https://docs.netgate.com/pfsense/en/latest/troubleshooting/filterdns-thread-errors.html

                    is filterdns running?

                    [23.05.1-RELEASE][admin@sg4860.local.lan]/root: ps -x | grep filterdns
                    49726  -  Is        0:00.02 /usr/local/sbin/filterdns -p /var/run/filterdns.pid -i 300 -c /var/etc/filterdns.conf -d 1
                    16872  0  S+        0:00.00 grep filterdns
                    [23.05.1-RELEASE][admin@sg4860.local.lan]/root: 
                    

                    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

                    A 1 Reply Last reply Reply Quote 2
                    • T
                      the_driver_123
                      last edited by

                      43a54622-e3b9-4837-9296-bedd2f365af2-image.png

                      uhm ....

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

                        The 'filterdns' logs together with 'unbound' into the Status > System Logs > System > DNS Resolver log.

                        You should see lines like this :

                        dd7de3f5-8b67-4e15-9ffe-ea042992c943-image.png

                        or other lines that indicate why filterdns can't start or fails.

                        edit : and it's normal your firewall rules don't work : the aliases stay empty, so the rules never match.

                        Also : I'm using 23.05.01 and filterdns works just fine.

                        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
                        • T
                          the_driver_123
                          last edited by the_driver_123

                          I cannot see unbound entries. Filterdns logs are displayed (but the process seems down , correct?)

                          No errors seem to be displayed

                          Other checks?

                          1 Reply Last reply Reply Quote 0
                          • T
                            the_driver_123
                            last edited by

                            I have set kern.threads.max_threads_per_proc and set it to 4096, re-loading the Table

                            kern.threads.max_threads_per_proc and set it to 4096.

                            ps -x | grep filterdns
                            29219 - Is 0:00.87 /usr/local/sbin/filterdns -p /var/run/filterdns.pid
                            43627 0 S+ 0:00.00 grep filterdns

                            a3f22c00-a9fb-4717-898a-7cad0f9afa51-image.png

                            Seems to be ok?

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

                              @the_driver_123 why would they change from 13 to 18.x.x.x - why no AAAA records?

                              If your client resolves some fqdn to IP X, and pfsense resoles it to Y then the rule wouldn't work because they wouldn't match up.

                              Your dns lookup before had AAAA as well.. But now it only has A, and they are completely different IP range?

                              they for sure can be different based on geo location from where your doing the query from - but odd that you were seeing 13s before and now 18s?

                              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

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

                                @johnpoz

                                In the old world :

                                18.172.213.14	A
                                18.172.213.21	A
                                18.172.213.108	A
                                18.172.213.90	A
                                2600:9000:2113:4e00:3:db06:4200:93a1	AAAA
                                2600:9000:2113:4600:3:db06:4200:93a1	AAAA
                                2600:9000:2113:a000:3:db06:4200:93a1	AAAA
                                2600:9000:2113:9c00:3:db06:4200:93a1	AAAA
                                2600:9000:2113:da00:3:db06:4200:93a1	AAAA
                                2600:9000:2113:ea00:3:db06:4200:93a1	AAAA
                                2600:9000:2113:7000:3:db06:4200:93a1	AAAA
                                2600:9000:2113:f000:3:db06:4200:93a1	AAAA
                                d2h67oheeuigaw.cloudfront.net	CNAME
                                

                                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 1
                                • T
                                  the_driver_123
                                  last edited by the_driver_123

                                  Yes is correct. I'm trying different docker.com sub domains .... don't worry

                                  Now is working well with the ALIAS and FQDN

                                  Thanks!!!

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

                                    @Gertjan yeah I am sure depending on what part of the globe you are in you would get different IPs.. But he showed 13.x before and now 18s - seems odd that the IPs he was seeing before would change so much, unless he is talking to some other dns than he was before, or routing over vpn or something.

                                    Just wanted to point out if client resolves some fqdn to X, and pfsense resolves it to Y.. The rules would never mach up because client would be trying to go to X, while pfsense rule would be using Y addresses.

                                    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

                                    T 1 Reply Last reply Reply Quote 0
                                    • T
                                      the_driver_123 @johnpoz
                                      last edited by the_driver_123

                                      @johnpoz as already explained, I have changed some FQDN using other subdomains. Sorry .

                                      Can I find which rules are using specific ALIAS?

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

                                        @the_driver_123 said in Aliases with FQDN not working in pFsense 2.7 CE or Plus 23.05.01:

                                        Can I find which rules are using specific ALIAS?

                                        Well that should be completely clear just looking at the rules.. You want some single place that lists like what rules are using alias X? I am not aware of something like that in the gui.. But you could just grep the full rules list..

                                        grep.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

                                        1 Reply Last reply Reply Quote 0
                                        • A
                                          Anry @johnpoz
                                          last edited by

                                          @johnpoz
                                          Greetings.
                                          I'll tell you my solution to the same problem.
                                          After reading the recommendations on the link
                                          https://docs.netgate.com/pfsense/en/latest/troubleshooting/filterdns-thread-errors.html
                                          set kern.threads.max_threads_per_proc to 4096.
                                          The problem with determining IP addresses remains.
                                          Set kern.threads.max_threads_per_proc to 8192.
                                          Oh miracle! The lists are working.
                                          In fact it turned out that:
                                          screen-2024-03-26-16-35-32.png
                                          The number of filterdns threads turned out to be more than 4096.

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