<?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 You have to use regular in Network Security</title>
    <link>https://community.cisco.com/t5/network-security/url-filtering-on-asa/m-p/2888035#M153623</link>
    <description>&lt;P&gt;You have to use regular expressions. &amp;nbsp;And it is worse than that. &amp;nbsp;If you type "&lt;SPAN&gt;thePiratebay.org" you will also find it works.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;You would need to use something more like:&lt;/SPAN&gt;&lt;/P&gt;
&lt;PRE class="prettyprint"&gt;&lt;SPAN&gt;&lt;SPAN&gt;regex PirateBay “.*\.[tT][hH][eE][pP][iI][rR][aA][tT][eE][bB][aA][yY]\.[oO][rT][gG]”&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/PRE&gt;
&lt;P&gt;DNS filtering is sometimes much easier. &amp;nbsp;Just block all DNS lookups for the domain instead. &amp;nbsp;This has the bonus of stopping all protocols trying to use it. &amp;nbsp;Note if the machine has already done a DNS lookup it will be cached. &amp;nbsp;So clear your DNS cache when testing.&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;Quick example:&lt;/P&gt;
&lt;PRE class="prettyprint"&gt;regex domain_logmein.com “\.logmein\.com”&lt;BR /&gt;&lt;BR /&gt;class-map type regex match-any DomainBlockList&lt;BR /&gt; description Blocked Domains&lt;BR /&gt; match regex domain_logmein.com&lt;BR /&gt; &lt;BR /&gt;policy-map type inspect dns PM-DNS-inspect&lt;BR /&gt; parameters&lt;BR /&gt;  message-length maximum 512&lt;BR /&gt;  match domain-name regex class DomainBlockList&lt;BR /&gt;  drop-connection log&lt;BR /&gt; &lt;BR /&gt;policy-map global_policy&lt;BR /&gt; class inspection_default&lt;BR /&gt;  inspect dns PM-DNS-inspect&lt;/PRE&gt;</description>
    <pubDate>Tue, 24 May 2016 03:23:14 GMT</pubDate>
    <dc:creator>Philip D'Ath</dc:creator>
    <dc:date>2016-05-24T03:23:14Z</dc:date>
    <item>
      <title>URL Filtering on ASA</title>
      <link>https://community.cisco.com/t5/network-security/url-filtering-on-asa/m-p/2888034#M153622</link>
      <description>&lt;P&gt;hi all,&lt;/P&gt;
&lt;P&gt;one of our site has an Ipoque DPI device that failed recently (currently on fail-to-wire).&lt;/P&gt;
&lt;P&gt;it would take a while for it to be replaced since it's a remote location.&lt;/P&gt;
&lt;P&gt;and we don't have the budget to do websense or IPS (FirePower).&lt;/P&gt;
&lt;P&gt;i would like to implement URL filtering on the ASA 5525-X while waiting for its RMA.&lt;/P&gt;
&lt;P&gt;below is what i did for testing on an ASA 5505.&lt;/P&gt;
&lt;P&gt;if i type "thepiratebay.org" the web session is reset, but when i type &lt;SPAN style="color: #ff0000;"&gt;www&lt;/SPAN&gt;.thepiratebay.org, the session goes through.&lt;/P&gt;
&lt;P&gt;also while the 3 domains are blocked, ALL domains that is NOT on the blacklist are also being blocked.&lt;/P&gt;
&lt;P&gt;i would appreciate if someone could further advise.&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;regex Facebook “.facebook.com”&lt;BR /&gt;regex Youtube “.youtube.com”&lt;BR /&gt;regex PirateBay “.thepiratebay.org”&lt;BR /&gt;regex Google “.google.com”&lt;BR /&gt;&lt;BR /&gt;access-list inside_mpc extended permit tcp any any eq www &lt;BR /&gt;access-list inside_mpc extended permit tcp any any eq https&lt;BR /&gt;&lt;BR /&gt;class-map type regex match-any BlackList&lt;BR /&gt;&amp;nbsp;match regex Facebook&lt;BR /&gt;&amp;nbsp;match regex Youtube&lt;BR /&gt;&amp;nbsp;match regex PirateBay&lt;BR /&gt;&lt;BR /&gt;class-map type regex match-any WhiteList&lt;BR /&gt;&amp;nbsp;match regex Google&lt;BR /&gt;&lt;BR /&gt;class-map type inspect http match-all AllowDomains&amp;nbsp;&amp;nbsp; &lt;BR /&gt;&amp;nbsp;match request header host regex class WhiteList&lt;BR /&gt;&lt;BR /&gt;class-map type inspect http match-all BlockDomains&lt;BR /&gt;&amp;nbsp;match request header host regex class BlackList&lt;BR /&gt;&lt;BR /&gt;class-map httptraffic&lt;BR /&gt;&amp;nbsp;match access-list inside_mpc&lt;BR /&gt;&lt;BR /&gt;policy-map type inspect http HTTP_POLICY&lt;BR /&gt;&amp;nbsp;parameters&lt;BR /&gt;protocol-violation action drop-connection&amp;nbsp; &lt;BR /&gt;&amp;nbsp;class AllowDomains&amp;nbsp;&amp;nbsp; &lt;BR /&gt;&amp;nbsp;class BlockDomains&lt;BR /&gt;&amp;nbsp; drop-connection&lt;BR /&gt;&lt;BR /&gt;policy-map inside-policy&lt;BR /&gt;&amp;nbsp;class httptraffic&lt;BR /&gt;&amp;nbsp; inspect http HTTP_POLICY&lt;BR /&gt;&lt;BR /&gt;service-policy inside-policy interface inside&lt;/P&gt;</description>
      <pubDate>Tue, 12 Mar 2019 07:47:09 GMT</pubDate>
      <guid>https://community.cisco.com/t5/network-security/url-filtering-on-asa/m-p/2888034#M153622</guid>
      <dc:creator>johnlloyd_13</dc:creator>
      <dc:date>2019-03-12T07:47:09Z</dc:date>
    </item>
    <item>
      <title>You have to use regular</title>
      <link>https://community.cisco.com/t5/network-security/url-filtering-on-asa/m-p/2888035#M153623</link>
      <description>&lt;P&gt;You have to use regular expressions. &amp;nbsp;And it is worse than that. &amp;nbsp;If you type "&lt;SPAN&gt;thePiratebay.org" you will also find it works.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;You would need to use something more like:&lt;/SPAN&gt;&lt;/P&gt;
&lt;PRE class="prettyprint"&gt;&lt;SPAN&gt;&lt;SPAN&gt;regex PirateBay “.*\.[tT][hH][eE][pP][iI][rR][aA][tT][eE][bB][aA][yY]\.[oO][rT][gG]”&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/PRE&gt;
&lt;P&gt;DNS filtering is sometimes much easier. &amp;nbsp;Just block all DNS lookups for the domain instead. &amp;nbsp;This has the bonus of stopping all protocols trying to use it. &amp;nbsp;Note if the machine has already done a DNS lookup it will be cached. &amp;nbsp;So clear your DNS cache when testing.&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;Quick example:&lt;/P&gt;
&lt;PRE class="prettyprint"&gt;regex domain_logmein.com “\.logmein\.com”&lt;BR /&gt;&lt;BR /&gt;class-map type regex match-any DomainBlockList&lt;BR /&gt; description Blocked Domains&lt;BR /&gt; match regex domain_logmein.com&lt;BR /&gt; &lt;BR /&gt;policy-map type inspect dns PM-DNS-inspect&lt;BR /&gt; parameters&lt;BR /&gt;  message-length maximum 512&lt;BR /&gt;  match domain-name regex class DomainBlockList&lt;BR /&gt;  drop-connection log&lt;BR /&gt; &lt;BR /&gt;policy-map global_policy&lt;BR /&gt; class inspection_default&lt;BR /&gt;  inspect dns PM-DNS-inspect&lt;/PRE&gt;</description>
      <pubDate>Tue, 24 May 2016 03:23:14 GMT</pubDate>
      <guid>https://community.cisco.com/t5/network-security/url-filtering-on-asa/m-p/2888035#M153623</guid>
      <dc:creator>Philip D'Ath</dc:creator>
      <dc:date>2016-05-24T03:23:14Z</dc:date>
    </item>
    <item>
      <title>hi,</title>
      <link>https://community.cisco.com/t5/network-security/url-filtering-on-asa/m-p/2888036#M153624</link>
      <description>&lt;P&gt;hi,&lt;/P&gt;
&lt;P&gt;your suggested regex seemed to work but ONLY for blocked domains.&lt;/P&gt;
&lt;P&gt;the config still blocks other allowed domains. i can access google but NOT yahoo even though i explicitly added it on the whitelist. below is the update config.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;cisco.com also worked even though it's not on the whitelist. i've also tried random sites, some allowed (i.e. verizon.com) and some were NOT (i.e att.com).&lt;/P&gt;
&lt;P&gt;any idea?&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;regex Facebook “.*\.[fF][aA][cC][eE][bB][oO][oO][kK]\.[cC][oO][mM]”&lt;BR /&gt;regex Youtube “.*\.[yY][oO][uU][tT][uU][bB][eE]\.[cC][oO][mM]”&lt;BR /&gt;regex PirateBay “.*\.[tT][hH][eE][pP][iI][rR][aA][tT][eE][bB][aA][yY]\.[oO][rR][gG]”&lt;BR /&gt;regex Google “.*\.[gG][oO][oO][gG][lL][eE]\.[cC][oO][mM]”&lt;BR /&gt;regex Yahoo “.*\.[yY][aA][hH][oO][oO]\.[cC][oO][mM]”&lt;BR /&gt;&lt;BR /&gt;access-list inside_mpc extended permit tcp any any eq www &lt;BR /&gt;access-list inside_mpc extended permit tcp any any eq https&lt;BR /&gt;&lt;BR /&gt;class-map type regex match-any BlackList&lt;BR /&gt;&amp;nbsp;match regex Facebook&lt;BR /&gt;&amp;nbsp;match regex Youtube&lt;BR /&gt;&amp;nbsp;match regex PirateBay&lt;BR /&gt;&lt;BR /&gt;class-map type regex match-any WhiteList&lt;BR /&gt;&amp;nbsp;match regex Google&lt;BR /&gt;&amp;nbsp;match regex Yahoo&lt;BR /&gt;&lt;BR /&gt;class-map type inspect http match-any AllowDomains &amp;nbsp;&lt;BR /&gt;&amp;nbsp;match request uri regex class WhiteList&lt;BR /&gt;&lt;BR /&gt;class-map type inspect http match-any BlockDomains&lt;BR /&gt;&amp;nbsp;match request uri regex class BlackList&lt;BR /&gt;&lt;BR /&gt;class-map httptraffic&lt;BR /&gt;&amp;nbsp;match access-list inside_mpc&lt;BR /&gt;&lt;BR /&gt;policy-map type inspect http HTTP_POLICY&lt;BR /&gt;&amp;nbsp;parameters&lt;BR /&gt;protocol-violation action drop-connection &amp;nbsp;&lt;BR /&gt;&amp;nbsp;class AllowDomains&amp;nbsp; &amp;nbsp;&lt;BR /&gt;&amp;nbsp;class BlockDomains&lt;BR /&gt;&amp;nbsp; drop-connection&lt;BR /&gt;&lt;BR /&gt;policy-map inside-policy&lt;BR /&gt;&amp;nbsp;class httptraffic&lt;BR /&gt;&amp;nbsp; inspect http HTTP_POLICY&lt;BR /&gt;&lt;BR /&gt;service-policy inside-policy interface inside&lt;/P&gt;</description>
      <pubDate>Tue, 24 May 2016 03:37:08 GMT</pubDate>
      <guid>https://community.cisco.com/t5/network-security/url-filtering-on-asa/m-p/2888036#M153624</guid>
      <dc:creator>johnlloyd_13</dc:creator>
      <dc:date>2016-05-24T03:37:08Z</dc:date>
    </item>
    <item>
      <title>Why do you need to define</title>
      <link>https://community.cisco.com/t5/network-security/url-filtering-on-asa/m-p/2888037#M153625</link>
      <description>&lt;P&gt;Why do you need to define AllowDomains? &amp;nbsp;Why not just have a BlockDomains and allow everything else?&lt;/P&gt;</description>
      <pubDate>Tue, 24 May 2016 03:42:06 GMT</pubDate>
      <guid>https://community.cisco.com/t5/network-security/url-filtering-on-asa/m-p/2888037#M153625</guid>
      <dc:creator>Philip D'Ath</dc:creator>
      <dc:date>2016-05-24T03:42:06Z</dc:date>
    </item>
    <item>
      <title>hi,</title>
      <link>https://community.cisco.com/t5/network-security/url-filtering-on-asa/m-p/2888038#M153626</link>
      <description>&lt;P&gt;hi,&lt;/P&gt;
&lt;P&gt;i've tried that before but it blocks 'some' websites.&lt;/P&gt;
&lt;P&gt;i tried it again and still the same. the config below blocks yahoo.com and att.com.&lt;/P&gt;
&lt;P&gt;can you help take a look and advise?&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;regex Facebook “.*\.[fF][aA][cC][eE][bB][oO][oO][kK]\.[cC][oO][mM]”&lt;BR /&gt;regex Youtube “.*\.[yY][oO][uU][tT][uU][bB][eE]\.[cC][oO][mM]”&lt;BR /&gt;regex PirateBay “.*\.[tT][hH][eE][pP][iI][rR][aA][tT][eE][bB][aA][yY]\.[oO][rR][gG]”&lt;BR /&gt;&lt;BR /&gt;access-list inside_mpc extended permit tcp any any eq www &lt;BR /&gt;access-list inside_mpc extended permit tcp any any eq https&lt;BR /&gt;&lt;BR /&gt;class-map type regex match-any BlackList&lt;BR /&gt;&amp;nbsp;match regex Facebook&lt;BR /&gt;&amp;nbsp;match regex Youtube&lt;BR /&gt;&amp;nbsp;match regex PirateBay&lt;BR /&gt;&lt;BR /&gt;class-map type inspect http match-all BlockDomains&amp;nbsp;&amp;nbsp; &amp;lt;&amp;lt;&amp;lt; ALSO TRIED match-any&lt;BR /&gt;&amp;nbsp;match request header host regex class BlackList&amp;nbsp;&amp;nbsp; &amp;lt;&amp;lt;&amp;lt; ALSO TRIED match request uri regex class BlackList&lt;BR /&gt;&lt;BR /&gt;class-map httptraffic&lt;BR /&gt;&amp;nbsp;match access-list inside_mpc&lt;BR /&gt;&lt;BR /&gt;policy-map type inspect http HTTP_POLICY&lt;BR /&gt;&amp;nbsp;parameters&lt;BR /&gt;protocol-violation action drop-connection&amp;nbsp; &amp;nbsp;&lt;BR /&gt;&amp;nbsp;class BlockDomains&lt;BR /&gt;&amp;nbsp; drop-connection&lt;BR /&gt;&lt;BR /&gt;policy-map inside-policy&lt;BR /&gt;&amp;nbsp;class httptraffic&lt;BR /&gt;&amp;nbsp; inspect http HTTP_POLICY&lt;BR /&gt;&lt;BR /&gt;service-policy inside-policy interface inside&lt;/P&gt;</description>
      <pubDate>Tue, 24 May 2016 04:15:36 GMT</pubDate>
      <guid>https://community.cisco.com/t5/network-security/url-filtering-on-asa/m-p/2888038#M153626</guid>
      <dc:creator>johnlloyd_13</dc:creator>
      <dc:date>2016-05-24T04:15:36Z</dc:date>
    </item>
    <item>
      <title>Last time I did this myself,</title>
      <link>https://community.cisco.com/t5/network-security/url-filtering-on-asa/m-p/2888039#M153627</link>
      <description>&lt;P&gt;Last time I did this myself, I used the domain method with DNS inspection.&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;Example:&lt;/P&gt;
&lt;PRE class="prettyprint"&gt;regex domain_trademe.co.nz "trademe\.co\.nz"&lt;BR /&gt;regex domain_youtube.com "youtube\.com"&lt;BR /&gt;regex domain_facebook.com "facebook\.com"&lt;BR /&gt;&lt;BR /&gt;class-map type regex match-any DomainBlockList&lt;BR /&gt; description Blocked Domains&lt;BR /&gt; match regex domain_facebook.com&lt;BR /&gt; match regex domain_trademe.co.nz&lt;BR /&gt; match regex domain_youtube.com&lt;BR /&gt;&lt;BR /&gt;policy-map type inspect dns PM-DNS-inspect&lt;BR /&gt;&amp;nbsp;parameters&lt;BR /&gt;&amp;nbsp; message-length maximum 512&lt;BR /&gt;&amp;nbsp; match domain-name regex class DomainBlockList&lt;BR /&gt;&amp;nbsp; drop-connection log&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN class="pln"&gt;policy&lt;/SPAN&gt;&lt;SPAN class="pun"&gt;-&lt;/SPAN&gt;&lt;SPAN class="pln"&gt;map global_policy&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN class="pln"&gt; &lt;/SPAN&gt;&lt;SPAN class="kwd"&gt;class&lt;/SPAN&gt;&lt;SPAN class="pln"&gt; inspection_default&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN class="pln"&gt;  inspect dns PM&lt;/SPAN&gt;&lt;SPAN class="pun"&gt;-&lt;/SPAN&gt;&lt;SPAN class="pln"&gt;DNS&lt;/SPAN&gt;&lt;SPAN class="pun"&gt;-&lt;/SPAN&gt;&lt;SPAN class="pln"&gt;inspect&lt;/SPAN&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 24 May 2016 04:28:22 GMT</pubDate>
      <guid>https://community.cisco.com/t5/network-security/url-filtering-on-asa/m-p/2888039#M153627</guid>
      <dc:creator>Philip D'Ath</dc:creator>
      <dc:date>2016-05-24T04:28:22Z</dc:date>
    </item>
    <item>
      <title>hi,</title>
      <link>https://community.cisco.com/t5/network-security/url-filtering-on-asa/m-p/2888040#M153628</link>
      <description>&lt;P&gt;hi,&lt;/P&gt;
&lt;P&gt;thanks! your DNS inspect config works like a charm!&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 24 May 2016 05:17:06 GMT</pubDate>
      <guid>https://community.cisco.com/t5/network-security/url-filtering-on-asa/m-p/2888040#M153628</guid>
      <dc:creator>johnlloyd_13</dc:creator>
      <dc:date>2016-05-24T05:17:06Z</dc:date>
    </item>
  </channel>
</rss>

