How To Save and Restore Iptables Rules Permanently In Ubuntu, CentOS, Fedora, Debian, Kali, Mint?

RSS
EMAIL
FACEBOOK
FACEBOOK
GOOGLE
GOOGLE
https://www.poftut.com/how-to-save-and-restore-iptables-rules-permanently-in-ubuntu-centos-fedora-debian-kali-mint/
PINTEREST
PINTEREST
INSTAGRAM

Iptables is standard and popular firewall provides by Linux distributions like Ubuntu, CentOS, Fedora, Debian etc. Iptables rules are managed in run time where a lot of rules are added, changed and remove. These changes are temporary changes where only running configuration is changed but do not saved temporarily. In this tutorial we will look how to save iptables rules permanently in Linux.

Save Ipv4 Rules in Debian, Ubuntu, Mint, Kali

We can use iptables-save command which will save the current iptables rules into /etc/iptables/rules.v4

Save Ipv4 Rules in CentOS, Fedora, RedHat

We can use iptables-save command which will save the current iptables rules into /etc/sysconfig/iptables

Save Ipv6 Rules in Debian, Ubuntu, Mint, Kali

We can use iptables-save command which will save the current IPv6 iptables rules into /etc/iptables/rules.v6

Save Ipv6 Rules in CentOS, Fedora, RedHat

We can use ip6tables-save command which will save the current IPv6 iptables rules into /etc/sysconfig/ip6tables

iptables-persistent Package For Debian, Ubuntu, Mint, Kali

Debian, Ubuntu, Kali and Mint provides package named iptables-persistent. This package will automatically save the iptables rules to the /etc/iptables/rules and also automatically load during boot. The rule names will be rules.v4 for IPv4 and rules.v6 for IPv6

Restore/Reload Ipv4 Rules in Debian, Ubuntu, Mint, Kali

We can restore IPv4 iptables rules with the iptables-restore command from /etc/iptables/rules.v4

Restore/Reload Ipv4 Rules in CentOS, Fedora, RedHat

We can restore IPv4 iptables rules with the iptables-restore command from /etc/sysconfig/iptables

Restore/Reload Ipv6 Rules in Debian, Ubuntu, Mint, Kali

We can restore IPv6 iptables rules with the ip6tables-restore command from /etc/iptables/rules.v6

Restore/Reload Ipv6 Rules in CentOS, Fedora, RedHat

We can restore IPv6 iptables rules with the ip6tables-restore command from /etc/sysconfig/ip6tables

RSS
EMAIL
FACEBOOK
FACEBOOK
GOOGLE
GOOGLE
https://www.poftut.com/how-to-save-and-restore-iptables-rules-permanently-in-ubuntu-centos-fedora-debian-kali-mint/
PINTEREST
PINTEREST
INSTAGRAM

LEARN MORE  How To Manage Windows Firewall From Command Line With Netsh Command

You may also like...

Leave a Reply

Your email address will not be published.

Enjoy this blog? Please spread the word :)