Difference between revisions of "Persistent firewall in Ubuntu"
From Notes_Wiki
m |
m |
||
Line 1: | Line 1: | ||
[[Main Page|Home]] > [[Ubuntu]] > [[Persistent firewall in Ubuntu]] | [[Main Page|Home]] > [[Ubuntu]] > [[Ubuntu Server or Desktop administration|Server or Desktop administration]] > [[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: | Use of normal iptables command in Ubuntu would cause firewall rules to not persist after reboot. For persistent firewall rules in Ubuntu use: | ||
Line 19: | Line 19: | ||
[[Main Page|Home]] > [[Ubuntu]] > [[Ubuntu Server or Desktop administration|Server or Desktop administration]] > [[Persistent firewall in Ubuntu]] | |||
[[Main Page|Home]] > [[Ubuntu]] > [[Persistent firewall in Ubuntu]] |
Latest revision as of 05:38, 15 February 2023
Home > Ubuntu > Server or Desktop administration > 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:
- sudo apt-get update
- sudo apt-get install iptables-persistent
- 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:
- https://www.digitalocean.com/community/tutorials/how-to-set-up-a-firewall-using-iptables-on-ubuntu-14-04
- http://www.microhowto.info/howto/make_the_configuration_of_iptables_persistent_on_debian.html
Home > Ubuntu > Server or Desktop administration > Persistent firewall in Ubuntu