- Plesk for Linux
- iptables rules getting reset after server reboot on Plesk server with CentOS 7.
- "firewalld" system service is removed or disabled.
- Firewall rule that allows connection to mail server is present in Plesk.
- Firewall rule that allows connection to mail server is missing in iptables after reboot:
# iptables -L -n -v | grep mail.example.com
"iptables" service is not adjusted to restore rules after system reboot.
Here is a solution for iptables service:
Re-apply firewall rules in Plesk:
Navigate to Plesk > Tools & Settings > Firewall > Modify Plesk Firewall rules and press Apply.
Set up iptables to restore its rules after reboot:
Login to the server via SSH.
Install "iptables-services" package:
# yum install iptables-services
Disable firewalld, enable iptables system service and start it:
# systemctl stop firewalld
# systemctl disable firewalld
# systemctl enable iptables
# systemctl start iptables
Save the iptables rules:
# service iptables save