nice work - I was looking to base my solution using cisofy-lynis but this is cleaner.
QQ: Can you please help me to understand if I need to use some extra tools/libs or anything? I am getting an error on line 321...
python3 -dd CIS_F5_Benchmark_Reporter.py -m
File "CIS_F5_Benchmark_Reporter.py", line 321
def control_3_1(self)
^
SyntaxError: invalid syntaxUPDATE: looks like a colon got lost in that proc-def on my side or during the install. The GitHub code is correct. With that tweak on my-side, it runs on my test box with the `-s` and/or `-f` flags.
NOTES: it might be obvious to many, but there are a few caveats that could save you from troubleshooting what look like authentication issues. I spent quite a bit of time digging into the code and then analyzing firewall & ACL log files - just to find out that the traffic never even made it to the mail server(s)..
- Self IPs vs. Management IP: By default, the F5 uses its Self IP (usually an untrusted port) for most local traffic. Many secure SMTP relays might only only trust the Management IP or a specific Internal/Relay IP. In those situations, you could be required to add a route table entry to force smtp-traffic - to go out over the specific port you need... In theory: if you don't want to (or can't) change the system's routing table, you might be able to force Python (smtplib.SMTP) to bind its outgoing connection specifically to the F5's Management IP address as a config option.
- Port Lockdown: Even if the routing is working exactly as expected, you may also need to ensure that the "Port Lockdown" setting on your Management IP isn't inadvertently blocking those outbound requests (though it usually only affects incoming traffic). just sayin...
- Mar 17, 2026
Hi Joe,
Thanks for your feedback. Glad to hear it is working now. Have fun!
Best regards,
--Niels