Create an AntiVirus Filter, AntiSpam, Content filter words/websites, block instant messaging or P2P programs using a Protection Profile in Fortigate

First of all, since we have a firewall that allows all these types of services, we will enable or use them. For this, We have to create a “Protection Profile” and enable everything that interests us, later we will have to assign this profile to a firewall rule.

www.bujarra.com

Then, We're going to “Firewall” > “Protection Profile”, We give you a name, And further below we go into each part, in that of “Anti-Virus”, which protocols we want it to scan, in this example it will scan antivirus in the protocols: HTTP, FTP, POP3, SMTP, IM (Instant Messenger – Instant Messaging). It will also block certain file extensions in the HTTP and FTP protocols since I have marked in “File Pattern”, to indicate which extensions we want to block, this would be done from the menu on the left > “Antivirus” > “File Pattern”. It is important to check in HTTP and FTP the option for “Comfort Clients” as this makes it less inconvenient for the user to have a firewall in the middle analyzing their files, Because if someone wants to download a 10Mb file, the user might think it isn't downloading since the progress bar doesn't move, as it's the FW that's downloading it., Later, the progress bar will run from the FW to the client PC and it will only take a second or two.. So it's better to check that option..

www.bujarra.com

Further down, in “Spam Filtering” This is where we will enable the firewall's AntiSpam feature., We will select which mail protocols we want it to monitor., I select the ones I will use: POP3 and SMTP.. We can tell it to check in the Black/White lists. (White and black lists) Whether an email is SPAM or not., Checking: “E-mail address BWL check”, And also interesting is the word score., Checking the option for “Banned word check”, This works by looking at a list of words that we set (in the menu on the left under “AntiSpam” > “Banned word”), here we will create a series of words and assign a score to each one, For example 10 puntos a cada palabra, y aquí enThresholdle daremos la puntuación total para clasificar un mail, For example 20. Si tenemos la palabra SEX que vale 10 points, y la palabra VIAGRA con otros 10, cuando el total llegue a 20 puntos las bloqueará y clasificará el mail como SPAM.

www.bujarra.com

In the part of “Web Filteringharemos bloqueos de webs, ya sea por contenido de palabras, al igual que el SPAM para el correo, esto para las webs, podemos bloquear ciertas palabras, o conjunto de ellas con elThreshold”, In my example, le pongo con 20 puntos que no me deje ver webs con palabras de ese contenido. Sería marcandoWeb Content Blockal protocolo HTTP y le ponemos una puntuación. In “Web URL Filter” we can block certain websites, the URL address, p. e.g: HTTP://www.bujarra.com so that it cannot be viewed. These configurations are done in the menu on the left, in “Web Filter”. We have already saved this profile, now we are going to configure all the options for AntiVirus, AntiSpam and Web Filtering.

www.bujarra.com

In “Antivirus” > “File Pattern” this is where we will indicate which file extensions will be blocked after having created this profile previously. We mark with “Enable” so that it does not allow us to download these extensions from the internet or by email…

www.bujarra.com

In “Antivirus” > “Config”, This is where we will also tell the AntiVirus to analyze viruses, which type of software or category we also want it to block, For example: Adware, dialers, keyloggers, hacking tools… usually, we enable all, ya que normalemente para nosotros siempre es lo mismo un virus que un adware o una barra de esas incomodas para el Internet Explorer

www.bujarra.com

In “Web Filter” > “Content Block” es donde crearemos las palabras prohibidas para que no pueda navegar a webs que aparezcan estas. A cada palabra la daremos una puntuación y cuando llegue al total que le indicamos en el “Protection Profile” no nos dejará visitar esa web. Para crear una palabra prohibida, Click on “Create New”.

www.bujarra.com

In “Pattern” ponemos la palabra prohibida y en “Score” la puntuación que le queremos dar, lo normal es dar a cada palabra una puntuación por igual, todas a 10, Click on “OK”.

www.bujarra.com

Y por ejemplo yo he puesto dos, “sexo” and “futbol”, cada una con puntuación de 10. Y como en el “Protection Profile” puse que cuando alguna web llegue a una puntuación de 20 no me la deje ver, luego la comprobaremos si es cierto o no.

www.bujarra.com

In “Web Filter” > “URL Filter” es donde bloquearemos acceso a determiandas webs, si queremos que nuestros usuarios no puedan acceder a ellas, crearíamos una nueva pulsando en “Create New” And the interesting part is having a listing of them (webmessenger.msn.com…), but for this to work, also, logically before, in the “Protection Profile”, we had to check the box of “Web Filtering” > “Web URL Filter”.

www.bujarra.com

Once everything is configured, we must apply it, Not bad, To whom?, well, to everyone who browses the internet through our firewall, ¿No? who has this Antivirus protection, AntiSPAM, Blocking websites by keywords, by URL… For this, we need to apply it to the firewall rule that allows internet access; We're going to “Firewall” > “Policy” and on the existing one of “INTERNAL -> WAN” we edit it by clicking the icon www.bujarra.com.

www.bujarra.com

We need to enable the checkbox of “Protection Profile” and look for the profile we created before, What was it: ProfileANTIVIRUSandANTISPAM. Click on “OK” so that this rule is applied immediately.

www.bujarra.com

Vemos que en el campo de “Profile” nos indica que ya tiene el nuestro. GOOD, ahora vamos a probar si realmente funciona. For example, para probar si el antivirus está funcionando, existe en internet una web para probarlo (http://www.eicar.org/anti_virus_test_file.htm). En esta web podemos bajarnos estos ficheros y comprobar por diferentes protocolos si todo funciona, For example, probar a bajarlos por HTTP, FTP… el fichero eicar no es un virus, simplemente es un test, así que no tengáis miedo. Si todo lo hemos configurado bien, debe de indicarlo.

www.bujarra.com

También podemos probar lo de las palabras prohibidas. Recordemos que he puesto a cada palabra 10 puntos y eran “futbol” and “sexo”, y el bloqueo cuando se llege a 20 puntos o más. Probamos en Google a buscar una de ellas, For example “futbol” y vemos que todo funciona bien, If we now do the Google search with two of the words, as the results show us those two words, we can see that it blocks us and indicates the reason.. If we don't clearly see the reason or want to, All these warning messages can be customized, Translate…

www.bujarra.com

GOOD, To customize any message, We go back to the firewall, and to “System” > “Config”. What we want, for example, is to edit the previous one it gave me, The one for banned words on websites, We edit the “HTTP” > “Banned word message” and click on www.bujarra.com.

www.bujarra.com

We put the HTML code we want with the variables that FortiGate uses, Just by looking at the code it is understood, It's quite simple. Otherwise, We directly translate what it says. We give “OK” And we check what would appear now.

www.bujarra.com

Now this would be my mistake, Clearer, With the company logo and in Spanish.

www.bujarra.com

And finally, in addition to the Antivirus and content filter,, we have the AntiSpam service, in “AntiSpam” > “Banned Word” this is where we will create, just like prohibited words,, the words that, if they appear in an email, will be considered SPAM once they reach a certain score. Click on “Create New”.

www.bujarra.com

And in “Pattern” we enter the word itself, typical SPAM words are “viagra”, “doctor”, “sex”… we assign them a score and “OK”.

www.bujarra.com

This would be my list of words, since in the previous profile we enabled AntiSpam, in the “Protection Profile”.

www.bujarra.com

And in “AntiSpam” > “Black/White List”, we can block emails from people we believe are SPAM, or directly block IP addresses of the originating mail server, all this from “IP Address” or “E-mail Address”, by creating them in “Create New”.


Recommended Posts

Author

nheobug@bujarra.com
Autor del blog Bujarra.com Cualquier necesidad que tengas, Do not hesitate to contact me, I will try to help you whenever I can, Sharing is living ;) . Enjoy documents!!!