title: Iptables: how to easily group rules in chain?
body: <p>I have some netfilter rules like this:</p>
  
  <pre><code>iptables -I INPUT -j NFQUEUE -p udp --dport 4444
  iptables -t mangle -I INPUT -j MARK --set-mark 100 -p udp --dport 4444
  iptables -I OUTPUT -j NFQUEUE -p udp --sport 4444
  iptables -t mangle -I OUTPUT -j MARK --set-mark 200 -p udp --sport 4444
  </code></pre>
  
  <p>I need a simple way to group this rules, aim to delete them all together, like this</p>
  
  <pre><code>iptables -N MYCHAIN
  
  iptables -I MYCHAIN -j NFQUEUE -p udp --dport 4444
  iptables -t mangle -I MYCHAIN -j MARK --set-mark 100 -p udp --dport 4444
  iptables -I MYCHAIN -j NFQUEUE -p udp --sport 4444
  iptables -t mangle -I MYCHAIN -j MARK --set-mark 200 -p udp --sport 4444
  
  # Fast deleting
  iptables -F MYCHAIN 
  iptables -X MYCHAIN 
  </code></pre>
  
  <p>But it doesn't works, surely i have to connect default chain with MYCHAIN, but i don't figure how. Are there better or simpler solutions?</p>