Support Forum
The Forums are a place to find answers on a range of Fortinet products from peers and product experts.
Not applicable

Allowing only certain URL' s

I need to block all web access for certain users EXCEPT for certain job related URL' s (i.e. weather.com) The users are allowed full access during certain times of the day (breaks, lunch, etc.) I was successful in configuring multiple policies to achieve this, but am looking to allow specific URL' s while blocking everything else. Can this be done with FortiOS and how? Thanks for any assistance.
20 REPLIES 20
UkWizard
New Contributor

you need to use a regex to block everything (its either * or . if i remember offhand) then explcitly whitelist the ones you want to allow.
UK Based Technical Consultant FCSE v2.5 FCSE v2.8 FCNSP v3 Specialising in Systems, Apps, SAN Storage and Networks, with over 25 Yrs IT experience.
UK Based Technical Consultant FCSE v2.5 FCSE v2.8 FCNSP v3 Specialising in Systems, Apps, SAN Storage and Networks, with over 25 Yrs IT experience.
rwpatterson
Valued Contributor III

Put the regex .* last. This will block everything! Make your valid allowances above this one.

Bob - self proclaimed posting junkie!
See my Fortigate related scripts at: http://fortigate.camerabob.com

Bob - self proclaimed posting junkie!See my Fortigate related scripts at: http://fortigate.camerabob.com
UkWizard
New Contributor

a single " ." dot should do the same, doesn' t it?
UK Based Technical Consultant FCSE v2.5 FCSE v2.8 FCNSP v3 Specialising in Systems, Apps, SAN Storage and Networks, with over 25 Yrs IT experience.
UK Based Technical Consultant FCSE v2.5 FCSE v2.8 FCNSP v3 Specialising in Systems, Apps, SAN Storage and Networks, with over 25 Yrs IT experience.
rwpatterson
Valued Contributor III

The dot means any character once. The star means the prior expression zero or any amount of occurances.

Bob - self proclaimed posting junkie!
See my Fortigate related scripts at: http://fortigate.camerabob.com

Bob - self proclaimed posting junkie!See my Fortigate related scripts at: http://fortigate.camerabob.com
UkWizard

The dot means any character once. The star means the prior expression zero or any amount of occurances.
Bob - Looks like fortinet disagree with us, accidentally stumbled on this KC document; http://kc.forticare.com/default.asp?id=796&Lang=1&SID= It says we should us ^.* to block all
UK Based Technical Consultant FCSE v2.5 FCSE v2.8 FCNSP v3 Specialising in Systems, Apps, SAN Storage and Networks, with over 25 Yrs IT experience.
UK Based Technical Consultant FCSE v2.5 FCSE v2.8 FCNSP v3 Specialising in Systems, Apps, SAN Storage and Networks, with over 25 Yrs IT experience.
rwpatterson
Valued Contributor III

The carat signifies that the expression starts at the left, I believe.... So starting with anything, match everything....

Bob - self proclaimed posting junkie!
See my Fortigate related scripts at: http://fortigate.camerabob.com

Bob - self proclaimed posting junkie!See my Fortigate related scripts at: http://fortigate.camerabob.com
Not applicable

Maybe this is not for this forum, BUT... do I use Firewall policies here or just web filtering?
rwpatterson
Valued Contributor III

The web filtering takes place in a protection profile that is placed into a policy...so yes.

Bob - self proclaimed posting junkie!
See my Fortigate related scripts at: http://fortigate.camerabob.com

Bob - self proclaimed posting junkie!See my Fortigate related scripts at: http://fortigate.camerabob.com
UkWizard
New Contributor

Just make sure you use " allow" and not " exempt" for the allowed list, as the latter would not perform any AV or IPS scanning.
UK Based Technical Consultant FCSE v2.5 FCSE v2.8 FCNSP v3 Specialising in Systems, Apps, SAN Storage and Networks, with over 25 Yrs IT experience.
UK Based Technical Consultant FCSE v2.5 FCSE v2.8 FCNSP v3 Specialising in Systems, Apps, SAN Storage and Networks, with over 25 Yrs IT experience.
Announcements

Select Forum Responses to become Knowledge Articles!

Select the “Nominate to Knowledge Base” button to recommend a forum post to become a knowledge article.

Labels
Top Kudoed Authors