Iptables -A INPUT -i br0 -m iprange --src-range 177.115.15.8-177.115.15.255 -j DROP
iptables -S
Iptables -L
iptables -L -v -n
Iptables -L -v -n | more
You could click on the "Report" option on your first post and ask the admin to delete the thread.Hi my apologies Colin I seemed to have found the rule. Perhaps I didn’t check properly. Is there anyway I can close the question.
That rule will have no effect because it is appended to the end of the INPUT chain after the existing DROP rule. Also it makes no sense because you're specifying traffic from the LAN interface (br0) but 177.115.15.0/24 is a public address range.Sorry for wasting time* and thanks for the quick response
iptables -A INPUT -s 192.168.0.0/24 -j DROP
You need to look at the existing rules. Matching rules earlier in the chain take precedence over later rules. The last rule in the INPUT chain is normally a "drop everything" rule. Therefore anything after that will never be processed. This is why most custom firewall rules are inserted rather than appended.Hi sorry Colin I don’t seem to follow in regards to the rule: does the rule have to be stated before the chain is defined.
That makes more sense if your LAN address range is 192.168.0.0/24 (and you insert it at the beginning of the chain). However, you don't want that exact rule because it would block all LAN devices from accessing the router.Is it due to the interface argument. Would this be correct:
Regarding the ip range, I was testing to see if I could block a range of devices on my LAN . Wouldn’t iptables block that range for that specific interface or is there a specific way to refer to local addresses
The “-i” option is for interface not insert
iptables -I INPUT -s 192.168.0.0/24 -j DROP
Welcome To SNBForums
SNBForums is a community for anyone who wants to learn about or discuss the latest in wireless routers, network storage and the ins and outs of building and maintaining a small network.
If you'd like to post a question, simply register and have at it!
While you're at it, please check out SmallNetBuilder for product reviews and our famous Router Charts, Ranker and plenty more!