DHCP error
-
benningtonr
- Posts: 524
- Joined: Tue May 22, 2012 2:16 pm
DHCP error
No DHCPOFFERs were received.
command = check_dhcp!
Any Ideas?
command = check_dhcp!
Any Ideas?
-
scottwilkerson
- DevOps Engineer
- Posts: 19396
- Joined: Tue Nov 15, 2011 3:11 pm
- Location: Nagios Enterprises
- Contact:
Re: DHCP error
Is there an active DHCP server on your network?
Does the DHCP server have available IP's to allocate?
Does the DHCP server have available IP's to allocate?
-
scottwilkerson
- DevOps Engineer
- Posts: 19396
- Joined: Tue Nov 15, 2011 3:11 pm
- Location: Nagios Enterprises
- Contact:
Re: DHCP error
it could be a firewall issue. To test you can do
Code: Select all
cd /usr/local/nagios/libexec
service iptables stop
./check_dhcp
service iptables start-
benningtonr
- Posts: 524
- Joined: Tue May 22, 2012 2:16 pm
Re: DHCP error
I am guessing this is ok?
[root@helpdesk27 libexec]# service iptables stop
iptables: Flushing firewall rules: [ OK ]
iptables: Setting chains to policy ACCEPT: filter [ OK ]
iptables: Unloading modules: [ OK ]
[root@helpdesk27 libexec]# ./check_dhcp
OK: Received 1 DHCPOFFER(s), max lease time = 0 sec.
[root@helpdesk27 libexec]# service iptables start
iptables: Applying firewall rules: [ OK ]
[root@helpdesk27 libexec]#
[root@helpdesk27 libexec]# service iptables stop
iptables: Flushing firewall rules: [ OK ]
iptables: Setting chains to policy ACCEPT: filter [ OK ]
iptables: Unloading modules: [ OK ]
[root@helpdesk27 libexec]# ./check_dhcp
OK: Received 1 DHCPOFFER(s), max lease time = 0 sec.
[root@helpdesk27 libexec]# service iptables start
iptables: Applying firewall rules: [ OK ]
[root@helpdesk27 libexec]#
Re: DHCP error
Yes, this was a firewall issue. It's working now:
I believe you need to open UDP ports 67 & 68 in iptables.[root@helpdesk27 libexec]# ./check_dhcp
OK: Received 1 DHCPOFFER(s), max lease time = 0 sec.
Be sure to check out our Knowledgebase for helpful articles and solutions!
-
benningtonr
- Posts: 524
- Joined: Tue May 22, 2012 2:16 pm
Re: DHCP error
i need to open them on the nagios?
-
benningtonr
- Posts: 524
- Joined: Tue May 22, 2012 2:16 pm
Re: DHCP error
[root@helpdesk27 ~]# iptables --list
Chain INPUT (policy ACCEPT)
target prot opt source destination
ACCEPT all -- anywhere anywhere state RELATED,ESTABLISHED
ACCEPT icmp -- anywhere anywhere
ACCEPT all -- anywhere anywhere
ACCEPT tcp -- anywhere anywhere state NEW tcp dpt:ssh
ACCEPT tcp -- anywhere anywhere state NEW tcp dpt:http
ACCEPT tcp -- anywhere anywhere state NEW tcp dpt:https
REJECT all -- anywhere anywhere reject-with icmp-host-prohibited
Chain FORWARD (policy ACCEPT)
target prot opt source destination
REJECT all -- anywhere anywhere reject-with icmp-host-prohibited
Chain OUTPUT (policy ACCEPT)
target prot opt source destination
Chain INPUT (policy ACCEPT)
target prot opt source destination
ACCEPT all -- anywhere anywhere state RELATED,ESTABLISHED
ACCEPT icmp -- anywhere anywhere
ACCEPT all -- anywhere anywhere
ACCEPT tcp -- anywhere anywhere state NEW tcp dpt:ssh
ACCEPT tcp -- anywhere anywhere state NEW tcp dpt:http
ACCEPT tcp -- anywhere anywhere state NEW tcp dpt:https
REJECT all -- anywhere anywhere reject-with icmp-host-prohibited
Chain FORWARD (policy ACCEPT)
target prot opt source destination
REJECT all -- anywhere anywhere reject-with icmp-host-prohibited
Chain OUTPUT (policy ACCEPT)
target prot opt source destination
-
scottwilkerson
- DevOps Engineer
- Posts: 19396
- Joined: Tue Nov 15, 2011 3:11 pm
- Location: Nagios Enterprises
- Contact:
Re: DHCP error
Yes.benningtonr wrote:i need to open them on the nagios?
Run
Code: Select all
iptables -I INPUT -i eth0 -p udp --dport 67:68 --sport 67:68 -j ACCEPT-
benningtonr
- Posts: 524
- Joined: Tue May 22, 2012 2:16 pm
Re: DHCP error
Great, that worked, thank you