Linux iptables – Tips, Tricks…

Published on Author gryzliLeave a comment

Add Iptables rule with a comment

Recently I needed to add iptables rule, which I can easily search later and get it’s id. What I needed some kind of “mark” of this rule, which seems that Iptables already had as a functionality – assign comments on iptables rule.

Here’s some simple example:


Here is how it looks in iptables then:


Iptables – Handle multiple ports in one rule

Simple rule to accept TCP traffic on multiple ports: 80,443,111






Leave a Reply

Your email address will not be published. Required fields are marked *

Captcha * Time limit is exhausted. Please reload CAPTCHA.