Posts

Showing posts from April, 2016

Updating Iptables rule using --line-number Option

There was a requirement for me to change an existing iptables rule with a new IP Address range. So, for this --line-numbers which comes with iptables proves to be very handy.

The requirement for me was to change the existing 10.200.0.0/20  range to 10.200.0.0/17  network in an iptables rule.

First I will grep  for the rule with the --line-numbers option.