![]() ![]() ![]() A INPUT -p udp -m multiport -dports 21194 -j ACCEPT A INPUT -p icmp -icmp-type echo-request -m hashlimit -hashlimit-upto 5 /s -hashlimit-mode srcip -hashlimit-srcmask 32 -hashlimit-name icmp-echo-drop -j ACCEPT A INPUT -m conntrack -ctstate RELATED,ESTABLISHED -j ACCEPT :POSTROUTING ACCEPT -A POSTROUTING -s 10.8.0.0 / 24 -m policy -pol none -dir out -j MASQUERADE ![]() We can display saved file using the cat command or search using the grep command/ egrep command: $ sudo /sbin/ip6tables-save > /etc/sysconfig/ip6tables Displaying saved rules on Linux $ sudo /sbin/iptables-save > /etc/sysconfig/iptables $ sudo /sbin/ip6tables-save > /etc/iptables/rules.v6ĬentOS/RHEL/Fedora/Rocky and AlmaLinux users run: $ sudo /sbin/iptables-save > /etc/iptables/rules.v4 Step 2 – Save IPv4 and IPv6 Linux firewall rules $ ssh ssh must type the following command as root user either using the sudo command or su command. For remote server login using the ssh command: Open the terminal application and then type the following commands. iptables-restore command or ip6tables-restore command – Restore IPv4 or IPv6 firewall rules and tables from a given file under Linux.iptables-save command or ip6tables-save command – Save or dump the contents of IPv4 or IPv6 Table in easily parseable format either to screen or to a specified file.You need to use the following commands to save iptables firewall rules forever: Saving iptables firewall rules permanently on Linux ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |