Created on 12-28-2021 02:37 AM
I have to block hundreds of IP addresses because of the flaw we all know.
However, I have a version of my fortigate 200D that is in 6.0, the latest version supported by my hardware.
When I import my file with the ips, there is no problem, I see it perfectly. Except that I can't, when I create a rule, find the famous import file to block the ips. Indeed, I have followed dozens of tutorials, but nothing works.
I would need a little help to explain me how to block the ips with my imported file.
Thank you for your help
Thank you for your answers gentlemen.
Indeed, your script can potentially help me but your link leads to nowhere.
Are you sure that the page exists on your forum?
It seems to me that your script is some difficulties to launch, unless I do it wrong.
Here is the answer of the latter by taking exactly your tutorial :
Created on 12-30-2021 04:03 AM
I am sorry for this. I've updated the script for Python 3, fixed syntax errors and tested it (in v3.8). I have removed the executable as well, as it was the old version.
I re-tested your script.
There are some problems with the brackets but nothing too bad. On the other hand, when all the small errors are corrected, the script returns the same error. I run it with "py".
Do you have the same problem ?
Created on 01-03-2022 02:02 PM Edited on 01-03-2022 02:06 PM
After some re-working on my script, it's now more robust to invalid inputs and fully supports the hosts.deny syntax, as well as a plain text file with one line per IP as input.
I thought of attaching the script here but at 520 lines length it would not really fit in here. I have republished it on my website.