The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

iptables on cPanel-DNSOnly and nrpe

Discussion in 'Security' started by Asim Zeeshan, Jul 11, 2015.

  1. Asim Zeeshan

    Asim Zeeshan Member

    Joined:
    Nov 13, 2011
    Messages:
    6
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Lahore, Pakistan
    cPanel Access Level:
    Root Administrator
    I have a clean installation of cPanel-DNSOnly. Everything is setup and running great

    • SELINUX is disabled
    • iptables is running
    • Added the following rule to enable nrpe requests from my nagios server (1.2.3.4)

    Code:
    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 ACCEPT
    To diagnose this, I tried these as well but no effect

    Code:
    iptables-save > /etc/sysconfig/iptables
    iptables -F
    iptables-restore < /etc/sysconfig/iptables
    iptables-save
    service iptables restart
    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?
     
  2. dalem

    dalem Well-Known Member
    PartnerNOC

    Joined:
    Oct 24, 2003
    Messages:
    2,577
    Likes Received:
    40
    Trophy Points:
    48
    Location:
    SLC
    cPanel Access Level:
    DataCenter Provider
    This should work for you
     
  3. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,723
    Likes Received:
    660
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    Hello :)

    Have you considered installing a firewall management utility such as CSF instead of adjusting the iptables rules manually?

    Thank you.
     
Loading...

Share This Page