Linux - SecurityThis forum is for all security related questions.
Questions, tips, system compromises, firewalls, etc. are all included here.
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you wanted to block the entire 220.127.116.11-18.104.22.168 range, then use either:
sbin/iptables -I INPUT -s 22.214.171.124/255.0.0.0 -j DROP
sbin/iptables -I INPUT -s 126.96.36.199/8 -j DROP
They do the same thing, you're just using CIDR notation instead of netmasks...
Note that using /24 will just block 188.8.131.52-184.108.40.206
if you do not want to do this manually, you can edit your /etc/sysconfig/iptables file.
You should never directly edit that file. It's very sensitive to syntax, including things that you can't see (like CRLF characters) which can be very difficult to diagnose. Use iptables-save (or "service iptables save" on RH-ish systems) instead.
My mistake, I meant to put in the /8 bit mask, not the /24 bit mask. I posted my response without re-reading it first.
And Capt Cavemean is right, you really shouldn't edit the /etc/sysconfig/iptables file, unless you really know what you are doing. I just mess around with it for fun... If you do decide to tinker, then make sure you make a backup of the file... Or any other system file you decide to mess with. Always good practice....