<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Block DoH providers on SMB in Spark Firewall (SMB)</title>
    <link>https://community.checkpoint.com/t5/Spark-Firewall-SMB/Block-DoH-providers-on-SMB/m-p/78027#M3226</link>
    <description>&lt;P&gt;Great idea! I'll keep this in my toolbox. I think you meant to use this jq though:&amp;nbsp;jq '.[] | select(.proto == "DoH") | .addrs'&lt;/P&gt;</description>
    <pubDate>Wed, 11 Mar 2020 22:10:50 GMT</pubDate>
    <dc:creator>Sean_Roth</dc:creator>
    <dc:date>2020-03-11T22:10:50Z</dc:date>
    <item>
      <title>Block DoH providers on SMB</title>
      <link>https://community.checkpoint.com/t5/Spark-Firewall-SMB/Block-DoH-providers-on-SMB/m-p/77116#M3162</link>
      <description>&lt;P&gt;Hello SMB admins,&lt;/P&gt;
&lt;P&gt;Inspired by this thread&lt;/P&gt;
&lt;P&gt;&lt;A href="https://community.checkpoint.com/t5/Access-Control-Products/How-to-deal-with-DNS-over-HTTPS-DNS-over-TLS-QUIC-and-PSOM/m-p/77082" target="_blank" rel="noopener"&gt;https://community.checkpoint.com/t5/Access-Control-Products/How-to-deal-with-DNS-over-HTTPS-DNS-over-TLS-QUIC-and-PSOM/m-p/77082&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;I decided to play a bit and came up with a simple command to block DoH providers on SMB using 'sim dropcfg':&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;#!/bin/sh

DB_FILE=/tmp/public-resolvers-doh.db

curl_cli -sk https://download.dnscrypt.info/dnscrypt-resolvers/json/public-resolvers.json | jq '.[] | {addrs,proto:"DoH"}' | grep -oE "\b([0-9]{1,3}\.){3}[0-9]{1,3}\b" | sort -n | uniq | awk '{print "dst " $0 " dport 443 proto 6"}' &amp;gt; $DB_FILE
if [ $(stat -c %s $DB_FILE) == 0 ]; then
  echo "error: failed to download DoH providers list"
  rm -f $DB_FILE
  exit 1
fi

echo "dst 1.1.1.1 dport 443 proto 6" &amp;gt;&amp;gt; $DB_FILE
echo "dst 104.16.248.249 dport 443 proto 6" &amp;gt;&amp;gt; $DB_FILE
echo "dst 8.8.4.4 dport 443 proto 6" &amp;gt;&amp;gt; $DB_FILE

sim dropcfg -e -y -f $DB_FILE
&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;This will only block DoH providers as DNScrypt ones have application recognition already. But if you need them too it is easy to adapt...&lt;/P&gt;
&lt;P&gt;Use '&lt;STRONG&gt;sim dropcfg -l&lt;/STRONG&gt;' to check current stats.&lt;/P&gt;</description>
      <pubDate>Thu, 12 Mar 2020 11:10:30 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/Spark-Firewall-SMB/Block-DoH-providers-on-SMB/m-p/77116#M3162</guid>
      <dc:creator>HristoGrigorov</dc:creator>
      <dc:date>2020-03-12T11:10:30Z</dc:date>
    </item>
    <item>
      <title>Re: Block DoH providers on SMB</title>
      <link>https://community.checkpoint.com/t5/Spark-Firewall-SMB/Block-DoH-providers-on-SMB/m-p/78027#M3226</link>
      <description>&lt;P&gt;Great idea! I'll keep this in my toolbox. I think you meant to use this jq though:&amp;nbsp;jq '.[] | select(.proto == "DoH") | .addrs'&lt;/P&gt;</description>
      <pubDate>Wed, 11 Mar 2020 22:10:50 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/Spark-Firewall-SMB/Block-DoH-providers-on-SMB/m-p/78027#M3226</guid>
      <dc:creator>Sean_Roth</dc:creator>
      <dc:date>2020-03-11T22:10:50Z</dc:date>
    </item>
    <item>
      <title>Re: Block DoH providers on SMB</title>
      <link>https://community.checkpoint.com/t5/Spark-Firewall-SMB/Block-DoH-providers-on-SMB/m-p/78054#M3229</link>
      <description>&lt;P&gt;Thanx! I am not exactly jq-master so I guess there is a better way to do it. This one seems to work fine as well.&lt;/P&gt;</description>
      <pubDate>Thu, 12 Mar 2020 04:25:23 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/Spark-Firewall-SMB/Block-DoH-providers-on-SMB/m-p/78054#M3229</guid>
      <dc:creator>HristoGrigorov</dc:creator>
      <dc:date>2020-03-12T04:25:23Z</dc:date>
    </item>
    <item>
      <title>Re: Block DoH providers on SMB</title>
      <link>https://community.checkpoint.com/t5/Spark-Firewall-SMB/Block-DoH-providers-on-SMB/m-p/78092#M3235</link>
      <description>Cool stuff, wondering why does it missing Cloudfare DNS (1.1.1.1), which responds on https too..</description>
      <pubDate>Thu, 12 Mar 2020 09:53:29 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/Spark-Firewall-SMB/Block-DoH-providers-on-SMB/m-p/78092#M3235</guid>
      <dc:creator>Martin_Valenta</dc:creator>
      <dc:date>2020-03-12T09:53:29Z</dc:date>
    </item>
    <item>
      <title>Re: Block DoH providers on SMB</title>
      <link>https://community.checkpoint.com/t5/Spark-Firewall-SMB/Block-DoH-providers-on-SMB/m-p/78099#M3236</link>
      <description>&lt;P&gt;Thanx for reminding me. I forgot to add them. Modified the script a little...&lt;/P&gt;</description>
      <pubDate>Thu, 12 Mar 2020 11:09:00 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/Spark-Firewall-SMB/Block-DoH-providers-on-SMB/m-p/78099#M3236</guid>
      <dc:creator>HristoGrigorov</dc:creator>
      <dc:date>2020-03-12T11:09:00Z</dc:date>
    </item>
  </channel>
</rss>

