LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 08-14-2013, 09:13 AM   #1
KLPZDM
LQ Newbie
 
Registered: Aug 2013
Posts: 3

Rep: Reputation: Disabled
Configuring DHCPD with deny unknown-clients


I am trying to setup a DHCP server on Centos in a lab so that it only hands out IPs to known host I have configured by mac reservations. I attempted to add the "deny unknown-clients" statement to the range section of the config file however after that all the devices with mac reservations lost their IPs. Below is a portion of my config file. Do I need to use pools to use deny?
Code:
ddns-update-style interim;
ignore client-updates;

subnet 192.168.253.0 netmask 255.255.255.0
{
  option routers 192.168.253.1;
  option subnet-mask 255.255.255.0;
  option time-offset -18000; # Eastern Standard Time
  
  option dhcp-rebinding-time 86400;
  option dhcp-renewal-time 119600;

  # option nis-domain "domain.org";
  # option domain-name "domain.org";
  # option domain-name-servers 192.168.253.1;

  range dynamic-bootp 192.168.253.32 192.168.253.247;
  deny unknown-clients;
  default-lease-time 900;
  max-lease-time 3600;

  host audioDA01 {
   hardware ethernet 00:02:d1:08:98:0e; 
   fixed-address 192.168.253.200;
  }
  host audioDA02 {
   hardware ethernet 00:02:d1:08:98:0f; 
   fixed-address 192.168.253.201;
  }
  host audioDA03 {
   hardware ethernet 00:02:d1:08:98:22; 
   fixed-address 192.168.253.202;
}

Last edited by KLPZDM; 08-14-2013 at 10:46 AM.
 
Old 08-14-2013, 10:27 AM   #2
YankeePride13
Member
 
Registered: Aug 2012
Distribution: Ubuntu 10.04, CentOS 6.3, Windows 7
Posts: 262

Rep: Reputation: 55
Hello,

Firstly someone will surely complain that the contents of your config file are not in the [ c o d e] [ / c o d e] tags.

I am pretty sure (but could be wrong) that the deny unknown-clients statement needs to be inside of a pool declaration.

After making the changes, did you restart the DHCPD service? If not I recommend running this command first :

Code:
dhcpd -t -cf /path/to/configFile/dhcpd.conf
This will test your current dhcpd.conf file for errors.

Other things I've noticed:

Did you accidentally delete the semicolon after deny unknown hosts when editing the config file to make it stand out? Or is it actually missing?

Also it looks like you might be missing a close curly brace, ending your subnet declaration, but again it might be due to your editing that it's missing.
 
1 members found this post helpful.
Old 08-14-2013, 10:41 AM   #3
KLPZDM
LQ Newbie
 
Registered: Aug 2013
Posts: 3

Original Poster
Rep: Reputation: Disabled
Thanks, the missing semi colon and brace were omitted by me in haste. Thanks for the heads up on the code tags. I will try you suggestions. I have seen some articles that say you should not use a deny or allow statements with address pools but I have seen others that say they have to be used within an address pool. Do you have any clarification on what is meant?
 
Old 08-19-2013, 09:52 AM   #4
KLPZDM
LQ Newbie
 
Registered: Aug 2013
Posts: 3

Original Poster
Rep: Reputation: Disabled
Solution

I was able to exclude unwanted clients from getting DHCP addresses by removing the range statement (range dynamic-bootp 192.168.253.32 192.168.253.247. Since the host statements contained all the mac to IP mappings a range was not needed.The "deny unknown-clients;" statement was also not needed.
 
  


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
[SOLVED] ISC DHCPD and Windows Clients YankeePride13 Linux - Server 4 02-22-2013 02:59 PM
dhcpd.conf question, groups and deny unknown-clients trey85stang Linux - General 1 12-29-2010 04:52 PM
Squid proxy allow/deny set of clients borganve Linux - Security 1 07-16-2009 08:22 AM
how to deny unknown users Winanjaya Linux - Security 9 05-22-2009 08:43 AM
RH9 and DHCPD issues with some clients paradigm Linux - Networking 5 11-03-2003 03:08 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 08:20 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
Open Source Consulting | Domain Registration