been having a lot of trouble with constant attacks on one of my servers (see this post). the attacks have become so severe that i’ve decided that simply banning individual ip addresses isn’t enough. i’m now blocking any ip originating in poland or russia. this may seem rather extreme but as this server doesn’t actually host a website that delivers content then it shouldn’t be getting many non-malicious visitors anyway.
just issue the following from the command line (as root) to update iptables…replacing ‘blocked.com’ with the domain/ip address that you want to thwart.
iptables –A INPUT –m string –algo bm –string “*blocked.com” –j DROP
0 Responses to “block domains using iptables”