Persist iptables redhat 7 ?
https://www.thegeekdiary.com/centos-rhel-how-to-make-iptable-rules-persist-across-reboots/
[IMPORTANT]
https://serverfault.com/questions/708728/iptables-not-starting-upon-reboot
https://www.tecmint.com/linux-firewall-iptables-interview-questions-and-answers/ [IMP]
https://linuxconfig.org/how-to-change-a-runlevel-on-rhel-7-linux-system
Typically the location of iptables configuration lies at ‘/etc/sysconfig/iptables‘ whereas firewalld configuration lies at ‘/etc/firewalld/‘, which is a set of XML files.
EDIT
/etc/firewalld/zones/public.xml
sudo systemctl status firewalld
sudo /sbin/service iptables status
sudo /sbin/service iptables save
sudo less /etc/sysconfig/iptables
sudo iptables -S
sudo iptables -A IN_public_allow -p tcp -m tcp --dport 27017 -m conntrack --ctstate NEW,UNTRACKED -j ACCEPT
-A IN_public_allow -p tcp -m tcp --dport 22 -m conntrack --ctstate NEW,UNTRACKED -j ACCEPT
-A IN_public_allow -p tcp -m tcp --dport 8080 -m conntrack --ctstate NEW,UNTRACKED -j ACCEPT
<service name="ssh"/>
<service name="dhcpv6-client"/>
<port protocol="tcp" port="8080"/>
No comments:
Post a Comment