issue with the Nagios

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
rkennedy
Posts: 6579
Joined: Mon Oct 05, 2015 11:45 am

Re: issue with the Nagios

Post by rkennedy »

Are you using IPV4 on your machine? Can you post the output of ifconfig?
Former Nagios Employee
mleo40
Posts: 37
Joined: Tue Jan 27, 2015 10:21 pm

Re: issue with the Nagios

Post by mleo40 »

if ifconfig isn't installed, try

ip /a

thanks
rkennedy
Posts: 6579
Joined: Mon Oct 05, 2015 11:45 am

Re: issue with the Nagios

Post by rkennedy »

Thanks @mleo40!

@h.sabrey let us know your result.
Former Nagios Employee
h.sabrey
Posts: 30
Joined: Sun Jun 14, 2015 7:18 am

Re: issue with the Nagios

Post by h.sabrey »

sorry gentlemen for the delay

here is the output of the ifconfig

Code: Select all

# ifconfig
em1: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 192.168.79.7  netmask 255.255.255.0  broadcast 192.168.79.255
        inet6 fe80::fab1:56ff:fec1:79ef  prefixlen 64  scopeid 0x20<link>
        ether f8:b1:56:c1:79:ef  txqueuelen 1000  (Ethernet)
        RX packets 6207506  bytes 1898624859 (1.7 GiB)
        RX errors 0  dropped 48  overruns 0  frame 0
        TX packets 893894  bytes 260067637 (248.0 MiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0
        device interrupt 20  memory 0xf7c00000-f7c20000  

lo: flags=73<UP,LOOPBACK,RUNNING>  mtu 65536
        inet 127.0.0.1  netmask 255.0.0.0
        inet6 ::1  prefixlen 128  scopeid 0x10<host>
        loop  txqueuelen 0  (Local Loopback)
        RX packets 620194  bytes 262340927 (250.1 MiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 620194  bytes 262340927 (250.1 MiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0
i guess im using ipv4
h.sabrey
Posts: 30
Joined: Sun Jun 14, 2015 7:18 am

Re: issue with the Nagios

Post by h.sabrey »

Hello Gents,


for somehow i've stopped the firewall.d service and the nagios web worked very well.

now how to add the following
1- add the nagios to the firewall.
2- secure my server and build a decent firewall allow me to access using ssh and http & https
h.sabrey
Posts: 30
Joined: Sun Jun 14, 2015 7:18 am

Re: issue with the Nagios

Post by h.sabrey »

mleo40 wrote:Working output:

# netstat -anp|grep :80
tcp 0 0 :::80 :::* LISTEN 13150/httpd

your machine is only listening on ipv6 ... ? That is strange
after checking the firewall below is the firewall status Centos7

Code: Select all

# firewall-cmd --list-all-zones
block
  interfaces: 
  sources: 
  services: 
  ports: 
  masquerade: no
  forward-ports: 
  icmp-blocks: 
  rich rules: 
	
dmz
  interfaces: 
  sources: 
  services: ssh
  ports: 
  masquerade: no
  forward-ports: 
  icmp-blocks: 
  rich rules: 
	
drop
  interfaces: 
  sources: 
  services: 
  ports: 
  masquerade: no
  forward-ports: 
  icmp-blocks: 
  rich rules: 
	
external
  interfaces: 
  sources: 
  services: ssh
  ports: 
  masquerade: yes
  forward-ports: 
  icmp-blocks: 
  rich rules: 
	
home
  interfaces: 
  sources: 
  services: dhcpv6-client ipp-client mdns samba-client ssh
  ports: 
  masquerade: no
  forward-ports: 
  icmp-blocks: 
  rich rules: 
	
internal
  interfaces: 
  sources: 
  services: dhcpv6-client ipp-client mdns samba-client ssh
  ports: 
  masquerade: no
  forward-ports: 
  icmp-blocks: 
  rich rules: 
	
public (default, active)
  interfaces: em1
  sources: 
  services: dhcpv6-client ssh
  ports: 
  masquerade: no
  forward-ports: 
  icmp-blocks: 
  rich rules: 
	
trusted
  interfaces: 
  sources: 
  services: 
  ports: 
  masquerade: no
  forward-ports: 
  icmp-blocks: 
  rich rules: 
	
work
  interfaces: 
  sources: 
  services: dhcpv6-client ipp-client ssh
  ports: 
  masquerade: no
  forward-ports: 
  icmp-blocks: 
  rich rules:
how to add the serverIP/nagios to the firewall in order to allow access.
User avatar
Box293
Too Basu
Posts: 5126
Joined: Sun Feb 07, 2010 10:55 pm
Location: Deniliquin, Australia
Contact:

Re: issue with the Nagios

Post by Box293 »

Code: Select all

firewall-cmd --zone=public --add-port=http/tcp
firewall-cmd --zone=public --add-port=http/tcp --permanent
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
h.sabrey
Posts: 30
Joined: Sun Jun 14, 2015 7:18 am

Re: issue with the Nagios

Post by h.sabrey »

great it works very well,.


many thanks
rkennedy
Posts: 6579
Joined: Mon Oct 05, 2015 11:45 am

Re: issue with the Nagios

Post by rkennedy »

Can I mark this thread as resolved and close this out now?
Former Nagios Employee
h.sabrey
Posts: 30
Joined: Sun Jun 14, 2015 7:18 am

Re: issue with the Nagios

Post by h.sabrey »

rkennedy wrote:Can I mark this thread as resolved and close this out now?

yes Please mark it as resolved
Locked