What's new
  • SNBForums Code of Conduct

    SNBForums is a community for everyone, no matter what their level of experience.

    Please be tolerant and patient of others, especially newcomers. We are all here to share and learn!

    The rules are simple: Be patient, be nice, be helpful or be gone!

iptables comment

Sepport

New Around Here
I want to prevent my DHCP-range IP devices from sending packages to the internet. Therefore I need to add following rule to the iptables:

iptables -I FORWARD -o eth0 -m iprange --src-range 192.168.100.140-192.168.100.160 -m comment --comment "DHCP range blocked" -j DROP

However, entering the above rule returns:
iptables: No chain/target/match by that name.

Apparently the problem is the comment that I want to add to the rule. The rule
iptables -I FORWARD -o eth0 -m iprange --src-range 192.168.100.140-192.168.100.160 -j DROP
works perfectly

How can I add a comment to this new rule when it is created.

My router is RT-AC5300 with Asuswrt-Merlin 380.69_2
 
I have tried this in the past. I do not think IPTABLES is compiled with the comment feature.
 
I was afraid so. I wanted to use the rule's comment to check in a script if a certain rule was inserted in the iptables before, and to remove it if so.

Thanks for having replied.
 

Support SNBForums w/ Amazon

If you'd like to support SNBForums, just use this link and buy anything on Amazon. Thanks!

Sign Up For SNBForums Daily Digest

Get an update of what's new every day delivered to your mailbox. Sign up here!
Back
Top