Persistent firewall in Ubuntu

From Notes_Wiki
Revision as of 06:22, 24 December 2017 by Saurabh (talk | contribs) (Created page with "<yambe:breadcrumb>Ubuntu|Ubuntu</yambe:breadcrumb> =Persistent firewall in Ubuntu= Use of normal iptables command in Ubuntu would cause firewall rules to not persist after re...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

<yambe:breadcrumb>Ubuntu|Ubuntu</yambe:breadcrumb>

Persistent firewall in Ubuntu

Use of normal iptables command in Ubuntu would cause firewall rules to not persist after reboot. For persistent firewall rules in Ubuntu use:

  1. sudo apt-get update
  2. sudo apt-get install iptables-persistent
  3. Then to save current firewall rules to persist after reboot use:
    sudo invoke-rc.d iptables-persistent save
    The persistent files are saved in /etc/iptables/rules.v4 and /etc/iptables/rules.v6


Refer: