Trying to configure Iptables to block certain internal IP's
I have an ubuntu server that acts as a gateway. Right now we have certain people who are allowed to access the net, and ones that aren't. What I'm trying to do is block the IP range that we dont want accessing the net. I tried 'iptables -I INPUT -m iprange --src-range 192.168.1.20-192.168.1.254 -j DROP' but that didnt work. What am I doing wrong?
|
INPUT chain - for incoming to firewall traffic, OUTPUT chain - for outgoing.
|
D'oh!
It still didnt work though. The command I used was: 'iptables -I OUTPUT -m iprange --src-range 192.168.1.20-192.168.1.254 -j DROP' |
check your rule list with command from root console: iptables-save
|
And what is "iprange"?
|
Finally got it using 'sudo iptables -A INPUT -m iprange --src-range 192.168.1.20-192.168.1.254 -i eth1 -j DROP'
iprange is a nice little command I picked up from http://www.cyberciti.biz/tips/linux-...-or-ports.html :) awesome little tool from all appearances. Thanks a lot for the help! |
All times are GMT -5. The time now is 09:52 PM. |