DD-WRT firewall rules on Open WRT

I’ve tried pasting some DD-WRT firewall rules (below) in OpenWRT but it doesn’t seem to work.

Does anyone know if there is something slightly different with the code on OpenWRT?

iptables -I FORWARD -d 108.175.32.0/255.255.240.0 -j REJECT

iptables -I FORWARD -d 198.38.96.0/255.255.224.0 -j REJECT

iptables -I FORWARD -d 198.45.48.0/255.255.240.0 -j REJECT

 

why it doesn’t work? iptables should be the same.

You tried to block several IP address right?

I am not good at this but maybe you can just use firewall settings.

https://wiki.openwrt.org/doc/uci/firewall

Block access to a specific host

The following rule blocks all connection attempts to the specified host address.

config rule
        option src              lan
        option dest             wan
        option dest_ip          123.45.67.89
        option target           REJECT