LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 09-14-2016, 11:45 AM   #1
ceantuco
Member
 
Registered: Mar 2008
Location: New York
Distribution: Debian
Posts: 809

Rep: Reputation: 88
Question Nagios XI on CentOS 6.5 firewall issues


Hi All,

I don't know if this is the correct forum for this post but here:

I have a CENTOS 6.5 server which I use as Proxy, FTP, Chat and Samba servers. After running the installation script of Nagios XI, all lost connection to the above services.
After disabling the firewall, I was able to gain access to all services. For now I have left the firewall disabled but I would like to know what changed. When I check firewall settings they all look okay.

Please advise
 
Old 09-14-2016, 01:06 PM   #2
MensaWater
LQ Guru
 
Registered: May 2005
Location: Atlanta Georgia USA
Distribution: Redhat (RHEL), CentOS, Fedora, CoreOS, Debian, FreeBSD, HP-UX, Solaris, SCO
Posts: 7,831
Blog Entries: 15

Rep: Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669
At a guess you either:
a) Weren't running iptables before and on turning it on blocked ports you haven't opened in iptables yet.
b) Were running iptables and had updated rules on the fly by inserting with the -I flag but never saved the file to /etc/sysconfig/iptables so on restart the rules it go were default rules in that file as opposed to the ones you had in memory.

So what is in your /etc/sysconfig/iptables file for rules? Do you have any other files saved in /etc/sysconfig made by the iptables-save command that have different rules?

Assuming /etc/sysconfig/iptables has default setup you'd have to edit that file to add the appropriate rules then restart iptables (or start iptables then add rules using iptables -I then use iptables-save to overwrite the file).

One thing to note is that for the "INPUT" chain the final rule is usually:
REJECT all -- 0.0.0.0/0 0.0.0.0/0 reject-with icmp-host-prohibited

A final possibility: It is important that that rule appear below all other rules in that "INPUT" chain as it essentially says to block anything not matched by earlier rules in the chain. Rules placed after it would never take effect because it applies the rules in the order they appear. If you had added a new rule to allow connection to Nagios or NRPE below that this rule would not have worked and its barely possible you somehow reordered to put the above REJECT rule above all your ACCEPT rules.
 
Old 09-14-2016, 01:27 PM   #3
ceantuco
Member
 
Registered: Mar 2008
Location: New York
Distribution: Debian
Posts: 809

Original Poster
Rep: Reputation: 88
Hi MensaWater,

Thanks for your quick response! I was able to fix it with your recommendations.

I checked the /etc/sysconfig directory, I did not see a 'iptables' file; however, I saw an iptables.old file that contained all the rules I configured in the past. I '#cp iptables.old iptables', re-enabled the firewall and now it is working fine. I also rebooted the server to ensure it would work and it does.

Thank you!
 
1 members found this post helpful.
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
NFS firewall issues with CentOS v7 lleb Linux - Networking 1 08-25-2014 03:14 PM
Nagios Issues lahirushanaka Linux - Software 8 12-10-2013 04:07 AM
Monitor servers with nagios behind firewall --witout ping, sarajevo Linux - Server 5 05-29-2009 03:35 AM
Nagios issues. sparc86 Linux - Server 2 04-12-2007 02:02 PM
ping behind firewall with Nagios enzo250gto Linux - Software 0 08-30-2004 05:02 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 11:29 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration