Help us enhance your Sophos Community experience. Share your thoughts in our Sophos Community survey.

This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

block all internet DNS services except 3

Hello,

      We want our lan users to not be able to change their dns settings on their computers or browsers to use other dns services available on the web.  We want to only allow access to these two dns servers : 208.67.222.222 and 208.67.220.220 (these are opendns servers).

     How can we setup a firewall rule to block all dns services, except for if that service is reaching to A) the sophos firewall itself, or B) these 2 IP's 208.67.222.222 and 208.67.220.220



This thread was automatically locked due to age.
Parents
  • Hello,

    There's two ways to solve this issue:

    1) On v18, you can create a new Firewall Rule on top of all others such as this example:

    EDIT: small error on the Picture above, I forgot to change from "Accept" to "Drop". Be aware.

    EDIT2: Fixed.

    This Firewall Rule will block access over (TCP/UDP on Port 53) for the entire WAN, but the Exclusion will allow the DNS Requests go through If It's for OpenDNS.
    The issue with this rule is: If a user tries to change DNS Server, It won't be able to connect to pretty much anything until she/he switches back to either OpenDNS or the Firewall Itself.

    * Remember to change the Source/Destinations to your desired ones;

    2) Or as a second option, you can use a NAT Rule, and redirect all DNS Requests that are being sent to the Internet to OpenDNS; This is a better approach since even If the user tries to change It's DNS Server, the DNS Request will be sent and answered through the DNS Server you choose for the DNAT.

    Here's an example:

    Remember to use your WAN Interface at "Outbound Interface".

    Thanks!


    If a post solves your question use the 'Verify Answer' button.

    Ryzen 5600U + I226-V (KVM) v20 GA @ Home

    XG 115w Rev.3 8GB RAM v19.5 MR3 @ Travel Firewall



    Fix.
    [edited by: Prism at 10:45 PM (GMT -7) on 11 Jun 2021]
  • OK, I think I have a problem to this... What about the new DNS over Https that all the browsers are going to standard??  DoH it is abbreviated.  How can we block that?  Otherwise that is obvious loophole.

  • Chrome, edge, firefox, and win10 all now support DoH

    Chrome, edge, win10 – use DoH but keep your current dns

    Firefox – uses DoH and changes dns to cloudflare

     

    However, it appears DoH uses a URL to lookup dns.

     

    Therefore if you BLOCK proxy/anonymizer in opendns, then DoH will be blocked for all other dns providers except opendns!

     

    I tested this with chrome, edge, ff, and tried to get it to resolve using DoH/secure dns set to another server and it would not let me bypass opendns.  So that is good.

     

    This document does appear to be true:

     

    https://umbrella.cisco.com/blog/doh-whats-all-the-fuss-about-dns-over-https

    but, .. I don't know what would happen if the user 1st change to a wrong dns that as blocked, then tried to change browsers to use an alternate DoH site..  I will test that.

Reply
  • Chrome, edge, firefox, and win10 all now support DoH

    Chrome, edge, win10 – use DoH but keep your current dns

    Firefox – uses DoH and changes dns to cloudflare

     

    However, it appears DoH uses a URL to lookup dns.

     

    Therefore if you BLOCK proxy/anonymizer in opendns, then DoH will be blocked for all other dns providers except opendns!

     

    I tested this with chrome, edge, ff, and tried to get it to resolve using DoH/secure dns set to another server and it would not let me bypass opendns.  So that is good.

     

    This document does appear to be true:

     

    https://umbrella.cisco.com/blog/doh-whats-all-the-fuss-about-dns-over-https

    but, .. I don't know what would happen if the user 1st change to a wrong dns that as blocked, then tried to change browsers to use an alternate DoH site..  I will test that.

Children
  • That's a completely different scenario from your post.

    By then, you should look at getting a list of those URL's being used for DoH & DoT, then create a URL Group and block them directly with a Web Filtering Policy.

    The Firewall will look at the SNI of those connection and block them through DPI; Or If your doing TLS Decryption, you can block those requests through MIME Type.

    More information can be found at: support.sophos.com/.../KB-000039056


    If a post solves your question use the 'Verify Answer' button.

    Ryzen 5600U + I226-V (KVM) v20 GA @ Home

    XG 115w Rev.3 8GB RAM v19.5 MR3 @ Travel Firewall

  • I tested this and thankfully am not able to circumvent by manually choosing DoH in browsers.  DoH requires underlying dns to find the DoH url where lookups are at.  If you have those blocked in proxy at opendns, there is no easy way to use DoH.  So blocking all other dns except what you want and then also blocking proxy type connections in the ones allowed, does the trick