• 8 Posts
  • 151 Comments
Joined 1 year ago
cake
Cake day: March 3rd, 2025

help-circle


  • Fail2ban does not listen on any port for it has no user interface. No interface at all actually. It’s just a process that monitors your logfiles and changes firewall rules and writes to syslog if you tell it to.

    I run it on internet facing servers so I use a ‘regular’ install and never docker. I see no advantage for docker in this case, but one huge disadvantage: Docker changes a lot on the network side. It creates bridges, and picks IP’s all by itself. I hate that. (I know you can put in a lot of effort to manage it, but no thanks keep your ‘hands’ of my network config thank you)








  • There are variouse alternatives to see what ports are open. Usually they autyo scan just the ip you come from, to avoid being used to scan a potential target.

    If you want more, just use Greenbone. Run it twice. Once from another IP just to know how the world sees you. One time internal network and add accounts to greenbone allowing it to login and check further.

    If you run linux, then Lynis is awesome to verify your config







  • whitelist of allowed ips

    Not exactly.

    If source is whitelisted, Accept (avoid being locked out myself)

    So all IP’s are allowed to begin with, but some (“my” IP’s like at home, my office etc) are on a whitelist ahead of everything else. They can’t become blacklisted to avoid myself becoming locked out. Then it’s the drop all on the blacklisted, followed by portscan detection. Only after that the ‘normal’ rules (allow https, smtp etc) begin.



  • Well, here is the CPU load:

    And there is no increase on delay’s or jitter compared to what i’m already facing on the WAN itself.

    It keep’s 6000+ hosts with possible harmful intend away from the ports I need/want open to the world. Actually, the router -while still being bored- offloads the services behind it. I really can’t see a reason not to keep doing it. But, sure, it’s a personal choice.



  • I’m using RouterOS. In the firewall rules you can create a rule that if an IP touches a port, it get added to a address list (optional with a time-out). So my FW rules begin like this:

    1. If source is whitelisted, Accept (avoid being locked out myself)
    2. If source IP is in the blacklist, drop all
    3. if source IP tries to connect to port 21,22,25,137-139, 113 (and a bunch of others) add it to the blacklist

    So using a portscanner will touch ports I’m not running any service on (like telnet) and you’ll be blocked. A time-out of one week on the blacklist usually gives me an blacklist of 6500+ addresses.

    This too has endless possibilities. t.ex. like port knocking. (‘touch’ one or more ports in a specified sequence in a specified time to be allowed to access the actual service port)