Quantcast
Channel: Tomato Firmware
Viewing all articles
Browse latest Browse all 5181

Trying to block traffic to certain IPs with iptables

$
0
0
My setup is: ASUS RT-N10P router with Advanced Tomato firmware v3.3-138 Max

I am trying to block access to certain IP ranges, and I used iptables rules for that.
My router's INPUT Chain policy is DROP, so I created the following Firewall Script to reject packets coming from those IPs:

Code:
 iptables -I INPUT -s 180.0.0.0/8 -j REJECT --reject-with icmp-host-prohibited
 iptables -I INPUT -s 222.0.0.0/8 -j REJECT --reject-with icmp-host-prohibited
And this is how my INPUT Chain...

Trying to block traffic to certain IPs with iptables

Viewing all articles
Browse latest Browse all 5181

Trending Articles