Page 2 of 3

Re: issue with the Nagios

Posted: Tue Dec 08, 2015 2:10 pm
by rkennedy
Are you using IPV4 on your machine? Can you post the output of ifconfig?

Re: issue with the Nagios

Posted: Tue Dec 08, 2015 2:23 pm
by mleo40
if ifconfig isn't installed, try

ip /a

thanks

Re: issue with the Nagios

Posted: Tue Dec 08, 2015 3:53 pm
by rkennedy
Thanks @mleo40!

@h.sabrey let us know your result.

Re: issue with the Nagios

Posted: Sat Dec 12, 2015 2:44 pm
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

Re: issue with the Nagios

Posted: Sat Dec 12, 2015 3:54 pm
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

Re: issue with the Nagios

Posted: Sat Dec 12, 2015 4:55 pm
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.

Re: issue with the Nagios

Posted: Mon Dec 14, 2015 1:32 am
by Box293

Code: Select all

firewall-cmd --zone=public --add-port=http/tcp
firewall-cmd --zone=public --add-port=http/tcp --permanent

Re: issue with the Nagios

Posted: Tue Dec 15, 2015 8:56 pm
by h.sabrey
great it works very well,.


many thanks

Re: issue with the Nagios

Posted: Wed Dec 16, 2015 11:15 am
by rkennedy
Can I mark this thread as resolved and close this out now?

Re: issue with the Nagios

Posted: Wed Dec 16, 2015 5:36 pm
by h.sabrey
rkennedy wrote:Can I mark this thread as resolved and close this out now?

yes Please mark it as resolved