LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 08-29-2008, 10:48 AM   #1
MikeyCarter
Member
 
Registered: Feb 2003
Location: Orangeville
Distribution: Fedora
Posts: 473

Rep: Reputation: 31
Question Which ports do I need to unblock for dhcp/nagios (dhcp_check) to work.


I was trying /usr/lib/nagios/plugins/check_dhcp from my laptop and got the following.

Code:
DHCP socket: 3
Hardware address: 00:18:8b:b7:4c:7a
DHCPDISCOVER to 255.255.255.255 port 67
DHCPDISCOVER XID: 1115235820 (0x427925EC)
DHCDISCOVER ciaddr:  0.0.0.0
DHCDISCOVER yiaddr:  0.0.0.0
DHCDISCOVER siaddr:  0.0.0.0
DHCDISCOVER giaddr:  0.0.0.0
send_dhcp_packet result: 548




No (more) data received (nfound: 0)
Result=ERROR
Total responses seen on the wire: 0
Valid responses for this machine: 0
CRITICAL: No DHCPOFFERs were received.
When I shutdown the iptables on my laptop I get:

Code:
DHCP socket: 3
Hardware address: 00:18:8b:b7:4c:7a
DHCPDISCOVER to 255.255.255.255 port 67
DHCPDISCOVER XID: 715816581 (0x2AAA7E85)
DHCDISCOVER ciaddr:  0.0.0.0
DHCDISCOVER yiaddr:  0.0.0.0
DHCDISCOVER siaddr:  0.0.0.0
DHCDISCOVER giaddr:  0.0.0.0
send_dhcp_packet result: 548




recv_result_1: 348
recv_result_2: 348
receive_dhcp_packet() result: 348
receive_dhcp_packet() source: 172.29.0.19
Result=OK
DHCPOFFER from IP address 172.29.0.20 via 172.29.0.19
DHCPOFFER XID: 715816581 (0x2AAA7E85)
DHCPOFFER chaddr: 00188BB74C7A
DHCPOFFER ciaddr: 0.0.0.0
DHCPOFFER yiaddr: 172.29.0.199
DHCPOFFER siaddr: 172.29.0.20
DHCPOFFER giaddr: 0.0.0.0
Option: 53 (0x01)
Option: 54 (0x04)
Option: 51 (0x04)
Option: 1 (0x04)
Option: 3 (0x04)
Option: 6 (0x10)
Option: 40 (0x14)
Option: 58 (0x04)
Option: 59 (0x04)
Lease Time: 86400 seconds
Renewal Time: 43200 seconds
Rebinding Time: 75600 seconds
Added offer from server @ 172.29.0.19 of IP address 172.29.0.199


No (more) data received (nfound: 0)
Result=ERROR
Total responses seen on the wire: 1
Valid responses for this machine: 1
OK: Received 1 DHCPOFFER(s), max lease time = 86400 sec.

To me this suggests I'm missing a port here somewhere on my firewall? I have bootpc and bootps open, what am I missing?
 
Old 08-29-2008, 11:42 AM   #2
zQUEz
Member
 
Registered: Jun 2007
Distribution: Fedora, RHEL, Centos
Posts: 294

Rep: Reputation: 54
A quick google search suggests this binds to udp port 67.

Also, you could you could temporarily add an IPTABLES logging rule to log dropped packets and thus see what ports are being dropped.

Add above your last "DROP/REJECT ALL" statement:
iptables -I INPUT {line#} -j LOG --log-prefix "### Firewall"

Then you will see all packets that don't match the above rules get logged to /var/log/messages (or wherever syslog logs your messages).
 
Old 08-29-2008, 12:02 PM   #3
MikeyCarter
Member
 
Registered: Feb 2003
Location: Orangeville
Distribution: Fedora
Posts: 473

Original Poster
Rep: Reputation: 31
Quote:
Originally Posted by zQUEz View Post
A quick google search suggests this binds to udp port 67.

Also, you could you could temporarily add an IPTABLES logging rule to log dropped packets and thus see what ports are being dropped.

Add above your last "DROP/REJECT ALL" statement:
iptables -I INPUT {line#} -j LOG --log-prefix "### Firewall"

Then you will see all packets that don't match the above rules get logged to /var/log/messages (or wherever syslog logs your messages).
I've opened port 67... hence my question. I'll add the line you suggested. See if I can locate it. Thanks.
 
Old 08-29-2008, 12:22 PM   #4
MikeyCarter
Member
 
Registered: Feb 2003
Location: Orangeville
Distribution: Fedora
Posts: 473

Original Poster
Rep: Reputation: 31
Lightbulb No real luck there

found it. I was locking down all dhcp responses to my local subnet. 172.29.0.0/24. Seems it didn't like that for port 68 (bootpc)
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Problem opening ports - ports appear open, but do not work. computer_freak_8 Linux - Software 10 09-20-2008 09:39 PM
how to set up DHCP for both LAN ports revinking Linux - Networking 3 07-30-2008 06:37 AM
nagios doesn't work after an upgrade on RH9 ntoughe Linux - Software 2 11-04-2005 01:58 AM
Need to unblock some ports in linux Perfect Fedora 3 08-13-2005 06:53 PM
DHCP, webmin, and TCP/IP ports mattrobbins Linux - Networking 5 10-14-2003 03:16 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 07:23 AM.

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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration