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

How to block a Domain and it's subdomains being accessed via IP address (without DNS-Filter)

Scheduled Pinned Locked Moved pfBlockerNG
12 Posts 2 Posters 1.7k 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.
  • S
    sgrockfort @johnpoz
    last edited by Apr 2, 2023, 2:04 PM

    @johnpoz Hello John, thank you for the quick answer.

    accesses to the domain are now blocked. No matter whether I access it by name or IP. However, this does not work on subdomains. Here, the accesses continue to work. Regardless of whether I access it via DNS or IP. I have attached two screenshots...

    dd58f0cc-8e0b-434f-8a9d-2335e22e82db-image.png

    0a0a353a-48c8-415c-8708-ff8c15f641b3-image.png

    57a1d6c5-4f04-44af-85c7-0252429531dc-image.png

    Thank you !!

    J 1 Reply Last reply Apr 2, 2023, 2:13 PM Reply Quote 0
    • J
      johnpoz LAYER 8 Global Moderator @sgrockfort
      last edited by Apr 2, 2023, 2:13 PM

      @sgrockfort and what does that whois fill in for your table. and what subdomain are you looking up?

      You understand wildcard blocking something.example.com or otherthing.example.com is not what you have there.. and is completely different than a whois lookup.

      Also your only blocking tcp.. You understand QUIC and udp is now used to access many things over the internet on 80 and 443.

      My example is just in unbound and blocks something.blocked.com or blocked.com or whatever.blocked.com - that is not what your doing with that checkmark in wildcard tld, and what gets blocked with a whois for 1e100.net you would have to look what gets populated in the table..

      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

      S 1 Reply Last reply Apr 2, 2023, 2:22 PM Reply Quote 0
      • S
        sgrockfort @johnpoz
        last edited by Apr 2, 2023, 2:22 PM

        @johnpoz Thank you so far.. It seems I miss some basic understandings and will dive a bit deeper firstly.

        What I basically want is to block all connections to 1e100.net and all it tons of subdomains. Regardless if someone (or some process) use a name or an IP.

        Thank you 😊

        J 1 Reply Last reply Apr 2, 2023, 2:43 PM Reply Quote 0
        • J
          johnpoz LAYER 8 Global Moderator @sgrockfort
          last edited by Apr 2, 2023, 2:43 PM

          @sgrockfort as already went over a dns block can stop something.1e100.net or otherthing.1e100.net

          But to block IP you would need to know what IP they are trying to talk to or what ASN that has the IP(s) they are talking too.

          Keep in mind that if you look up say something.1e100.net or otherthing.1e100.net, the IPS might be in completely different ASNs So if the the device is using IP to talk that it knows about and doesn't need to look up via dns.. You have to know what IPs those are, then you can either block the specific IP, or the whole netblock(s) that are routed by the ASN..

          But there is no dns lookup that can stop a client from using some hard coded IP.. And if they are using hardcoded IPs - how would you know what those are or what ASN they are even in without actually seeing the traffic..

          You could block anything.1e100.net and all IPs via asn X for anything at all related to that, but for all you know the IP they are talking to is in asn Y or Z..

          Keep in mind as well as now these applications or iot devices are using doh to circumvent any local dns controls.. So you have to block that as well, which can be difficult if they are not using wellknown doh servers, etc.

          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

          S 1 Reply Last reply Apr 2, 2023, 3:32 PM Reply Quote 1
          • S
            sgrockfort @johnpoz
            last edited by Apr 2, 2023, 3:32 PM

            @johnpoz oh wow. This worked fine :-)

            I have blocked the ASN that contains the domain and the connections are now blocked. That was the building block I was missing and here I learned something again.

            Probably other domains are now also blocked within the ASN that I didn't want to have, but anyway, it was just a matter of understanding. 😊 Furthermore, I have understood that it does not work the way I thought it would before. (And this was basically my question) 😀

            Many thanks for your effort !!!!

            J 1 Reply Last reply Apr 2, 2023, 4:27 PM Reply Quote 0
            • J
              johnpoz LAYER 8 Global Moderator @sgrockfort
              last edited by johnpoz Apr 2, 2023, 4:30 PM Apr 2, 2023, 4:27 PM

              @sgrockfort said in How to block a Domain and it's subdomains being accessed via IP address (without DNS-Filter):

              I have blocked the ASN

              Yeah that can be very problematic with something like ie100.net (google) But that will most likely show up in lots of ASNs all across the globe.. What specific one(s) did you block?

              They use that as the PTR for all of their ips..

              https://support.google.com/faqs/answer/174717?hl=en

              Not sure exactly how you found it to be honest, you prob shouldn't be blocking that, you blogspot.com would be a forward domain, and again prob hosted off multiple IPs globally.

              multiplenetworks.jpg

              So blocking all of those different IP ranges or ASNs is most likely going to block stuff you don't want to block, etc...

              And if your clients are allowed to use IPv6 - its more that would need to be blocked..

              edit: As a side not when blocking stuff - keep in mind if your client creates a state to 1.2.3.4 you blocking 1.2.3.0/24 would do nothing because the state would allow the traffic anyway. When you create blocks, you need to make sure there are no existing states currently for the destination IP/Range you want to block.. Or you block will not seem to be working, until that state goes away via timeout or is killed or closed by the normal means, etc.

              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

              S 1 Reply Last reply Apr 3, 2023, 6:27 AM Reply Quote 0
              • S
                sgrockfort @johnpoz
                last edited by Apr 3, 2023, 6:27 AM

                @johnpoz Hello John,

                yes, you are right... I blocked AS15169 and the 1e100 was blocked.

                Unfortunately, everything else from google too. Of course, this is not what I originaly wanted. But at least I now understand how it basically works or doesn't work.

                I am currently working on two other solutions.

                1. since I now know the IP ranges of AS15169, I'll build a script that performs a one-time reverse lookup on each IP and thus generate a list of IPs that belong to 1e100.net.

                2. I try to find out via wireshark if/which DNS servers Chrome uses for doh and block them. Maybe I can achieve that my own DNS is used or has to be used and can then simply filter out the domain via DNS.

                S J 2 Replies Last reply Apr 3, 2023, 7:31 AM Reply Quote 0
                • S
                  sgrockfort @sgrockfort
                  last edited by Apr 3, 2023, 7:31 AM

                  p.s. I have just blocked the first /24 network, in which there were only IPs with the name 1e100.net. Unfortunately, this actually leads to the fact that everything that somehow goes hand in hand with google no longer works.

                  As already mentioned, I was more concerned with the technical implementation than with any real benefit.

                  anyway, thanks again.

                  1 Reply Last reply Reply Quote 0
                  • J
                    johnpoz LAYER 8 Global Moderator @sgrockfort
                    last edited by johnpoz Apr 3, 2023, 11:45 AM Apr 3, 2023, 11:42 AM

                    @sgrockfort said in How to block a Domain and it's subdomains being accessed via IP address (without DNS-Filter):

                    a list of IPs that belong to 1e100.net.

                    That is every single one of their IPs ;) -- did you read the link I posted?

                    ;; QUESTION SECTION:
                    ;google.com.                    IN      A
                    
                    ;; ANSWER SECTION:
                    google.com.             192     IN      A       142.250.190.46
                    
                    ;; QUESTION SECTION:
                    ;46.190.250.142.in-addr.arpa.   IN      PTR
                    
                    ;; ANSWER SECTION:
                    46.190.250.142.in-addr.arpa. 86400 IN   PTR     ord37s33-in-f14.1e100.net.
                    

                    They use the 1e100.net for their PTR for every one of their IPs.. This is a "reverse" lookup, again not something you should be concerned with.. You should be concerned with blocking the forward fqdn your device/user is trying to go too.

                    ;; QUESTION SECTION:
                    ;www.google.com.                        IN      A
                    
                    ;; ANSWER SECTION:
                    www.google.com.         676     IN      A       172.217.4.68
                    
                    ;; QUESTION SECTION:
                    ;68.4.217.172.in-addr.arpa.     IN      PTR
                    
                    ;; ANSWER SECTION:
                    68.4.217.172.in-addr.arpa. 86400 IN     PTR     ord37s18-in-f4.1e100.net.
                    68.4.217.172.in-addr.arpa. 86400 IN     PTR     lga15s47-in-f68.1e100.net.
                    
                    blogspot.com.           30      IN      A       142.251.32.9
                    9.32.251.142.in-addr.arpa. 86400 IN     PTR     ord38s33-in-f9.1e100.net.
                    

                    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

                    S 1 Reply Last reply Apr 3, 2023, 1:07 PM Reply Quote 0
                    • S
                      sgrockfort @johnpoz
                      last edited by Apr 3, 2023, 1:07 PM

                      @johnpoz said in How to block a Domain and it's subdomains being accessed via IP address (without DNS-Filter):

                      They use the 1e100.net for their PTR for every one of their IPs.. This is a "reverse" lookup, again not something you should be concerned with.. You should be concerned with blocking the forward fqdn your device/user is trying to go too.

                      Yes, thank you, I read the article from the link. 😊

                      I'm not really worried about it either. But I hate it when a system tries to escape my control by cooking its own soup. It's just a principle that triggers me and I enjoy trying to find a solution. Besides, you always learn quite a lot in the process.

                      I looked at what Chrome does on startup using mitmproxy and if I saw it correctly, Chrome doesn't actually do DoH/DoT queries. Presumably some IPs are actually hardcoded.

                      The easiest thing to do is probably to uninstall Chrome. 😇 😂

                      1 Reply Last reply Reply Quote 0
                      12 out of 12
                      • First post
                        12/12
                        Last post
                      Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.
                        This community forum collects and processes your personal information.
                        consent.not_received