I finally found how to to it:

# iptables -I FORWARD 1 -d 192.168.8.1 -j ACCEPT
# iptables -I FORWARD 2 -d 192.168.8.0.24 -j DROP

Here I am telling iptables:

Accept all the packages going to the router (.1). and reject the rest.

I am using the FORWARD chain. I am not sure why I wasn’t able to use the INPUT/OUTPUT chains.

Looking now into how to persists the new rules.

1 Like