iptables on cPanel-DNSOnly and nrpe
I have a clean installation of cPanel-DNSOnly. Everything is setup and running great
[LIST]
SELINUX is disabled
iptables is running
Added the following rule to enable nrpe requests from my nagios server (1.2.3.4)
To diagnose this, I tried these as well but no effect
After spending about 2 hours, I just turned it off and nagios could reach the cPanel-DSNOnly server. At the moment its stopped but I want to fix my problem to get it back online with iptables Any help?
iptables -A INPUT -m tcp -p tcp --src 1.2.3.4 --dport 5666 -j ACCEPT
iptables -A INPUT -m udp -p udp --src 1.2.3.4 --dport 5666 -j ACCEPTTo diagnose this, I tried these as well but no effect
iptables-save > /etc/sysconfig/iptables
iptables -F
iptables-restore < /etc/sysconfig/iptables
iptables-save
service iptables restartAfter spending about 2 hours, I just turned it off and nagios could reach the cPanel-DSNOnly server. At the moment its stopped but I want to fix my problem to get it back online with iptables Any help?
-
This should work for you iptables -I INPUT -p tcp -s 1.2.3.4 --dport 5666 -j ACCEPT iptables -I INPUT -p udp -s 1.2.3.4 --dport 5666 -j ACCEPT iptables -A INPUT -p tcp --dport 5666 -j DROP iptables -A INPUT -p udp --dport 5666 -j DROP service iptables save 0 -
Hello :) Have you considered installing a firewall management utility such as CSF instead of adjusting the iptables rules manually? Thank you. 0
Please sign in to leave a comment.
Comments
2 comments