- Have the router to block portscanners
What do you mean by this?
Comment on Am I doing this (networking) safely?
redlemace@lemmy.world 1 day ago
My usual additions:
- Have the router to block portscanners
What do you mean by this?
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:
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)
This is a waste of time and your router’s CPU. You already have a whitelist and know your safe TCP sources, just drop all wan traffic and only allow new input from whitelist. Your chain input rule is just creating a pretty list of bots you’re dropping anyway.
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.
Off-topic: Looks like you missed the two spaces after beginning a new line.
Just wanted to inform you in case you werent aware ;)
the spacebar on my Remington isn’t what it used to be, maybe a drop of oil will help ;)
flork@lemy.lol 1 day ago
Thanks I’ll look into these. Quick question: how does fail2ban use port 80 if that’s already used by nginx?
redlemace@lemmy.world 1 day ago
It does not. It does not uses ports at all. Fail2ban monitors your logfiles and activates the firewall to block IP’s that matched your rules.
t.ex. You can block an IP that tried to access https://<url>/admin. You can block an IP that used wrong credentials x times to login on an ssh port. Or block one that tried to relay via your mailserver. The duration is configurable and alternative duration can be configured for recidivists.
And yes, you can whitelist IP’s to avoid locking yourself out. The possibilities are endless.