Skip to main content
Steffi
New Member
February 6, 2021
Solved

Blocking specific subdirectory of domain

  • February 6, 2021
  • 3 replies
  • 6989 views
Hello! I would like to access the following url: www.heise.de But I would like to block all subfolders/subdirectories, like www.heise.de/forum, www.heise.de/forum/startseite etc. The site is https, I have a Fortigate 30d with latest 5.8 fw, webfilters working. I tried everything with filters, at least that I know of. I can block of course the whole domain, but not the subdirectories to their forum. I suspect, it has something to do with the https. Reason: I want myself being blocked from posting in their forum, but still, I want to consume the news=) Any help? Thx.
    Best answer by emnoc

    You can build a web filter profile but in each case ssl decryption is going to be needed. Filtering by SNI is not going to be helpful since the Host: header is not part of the SNI extension.

     

    Ken Felix

     

     

    3 replies

    emnoc
    New Member
    February 7, 2021

    You would need to build a custom ips signature and set the action to drop.

     

    I would start by finding the fortios custom ips-signature documentation and build a signature. For HTTPS you will need ssl/tls decoding in order to see the requested in the body.

     

    It should look similar to this ;

     

    config ips custom 

      edit web-block 

    set signature "F-SBID( --name \"web_heise\";  --pattern "Host|3A|www.heise.de/forum"; --no_case ;  --protocol tcp; --dst_port 80;  --default_action drop; --flow from_client; )" 

     

    You would write one for http and https and apply the ips rule in your firewall policy that allows traffic to the website.   

     

    Ken Felix

     

     

    Steffi
    SteffiAuthor
    New Member
    February 7, 2021
    Thx for your answer. So, as I can see from your answer, it should not be possible with simple url filter (simple, regex oder wildcard), right? I can also see, that ssl deep inspection is needed. I know, not difficult to implement, but in my case, too much for an simple url block.
    emnoc
    emnocAnswer
    New Member
    February 7, 2021

    You can build a web filter profile but in each case ssl decryption is going to be needed. Filtering by SNI is not going to be helpful since the Host: header is not part of the SNI extension.

     

    Ken Felix

     

     

    Thought Leadership Security Summit. Outpace New Threats with AI - enhanced defense. Tuesday, Septmeber 15, 8:30 AM - 2:30 PM PT. The Golf Club at Newcastle, WA.
    Fortinet Flag the Hack. Wednesday, August 26, 9:00 AM - 5:00 PM ET, COSM, Atlanta, GA.
    Virtual event | September 2026. SASE summit. The age of autonomous trust. Register here!