Solved

How to Limit MAC addresses in my DHCP Linux server

Posted on 2009-07-11
6
1,767 Views
Last Modified: 2013-12-06
Hi all ...

Hi have dhcp linux server , it is work fine , but I need to specify MAC's addresses for Trusted PC Only witch Only I need to get dynamic ip from dhcp , so if another/Unowned  PC's connect to my switch then it can not get ip from my dhcp

Note : I need PC get Dynamic IP NOT Static/Reserved  IP

my desrto is CentOS 5.3

Thank ..


Show my DHCP configurations
############################
## DHCP Configurations
## Configured By KING SABRI
############################
 
# ---> Options
 
ddns-update-style none; # keep it simple for now ( donn't use this option when you have DNS server )
ignore client-updates;  # here too authoritative ( donn't use this option when you have DNS server )
default-lease-time 600;
max-lease-time 7200;
authoritative;
DHCPARGS=eth1;          # what interface to listen on as DHCP
# ---> END
 
# ---> Subnet 30.0.0.0/8
 
subnet 30.0.0.0 netmask 255.0.0.0 {
 
       option routers                  30.0.0.1;         # gateway is eth1 LAN interface
       option subnet-mask              255.0.0.0;        # subnet mask
       option domain-name              "30.0.0.1";       # domain name given to client
       option domain-name-servers      30.0.0.1;         # the IP of your ISP's nameservers you're using
       option broadcast-address        30.255.255.255;   # Broadcast
       range 30.0.0.11 30.0.0.100;                       # the range of IP's your clients will get
# ---> END

Open in new window

0
Comment
Question by:eng-sabri
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
6 Comments
 
LVL 9

Accepted Solution

by:
DCMBS earned 125 total points
ID: 24831894
Hi.  MAC address filtering can be done ip IPtables MC Module.  It is not a DHCP function.

Check the following link.

http://www.cyberciti.biz/tips/iptables-mac-address-filtering.html
0
 
LVL 1

Author Comment

by:eng-sabri
ID: 24833619
Thank you DCMBS for help , but I know how to allow and prevent MAC from iptables

I think sir there are options can support my request like playing with

 host apex {

      hardware ethernet 00:A0:78:8E:9E:AA;
      fixed-address 192.168.1.4;
   }

you can see " fixed-address 192.168.1.4  "

so I think there are some options do not force fixed ip of put " if statement  " or thing like that  
0
 
LVL 9

Expert Comment

by:DCMBS
ID: 24834032
Well I'm not sure what you are tring to achieve.  If you use iptables to restrict connections based on MAC addess then if a connection is allowed it will get a dynamic IP address from DHCP.  I don't know any way to do this just using DHCP.  DHCP issues dynamic or reserved IP addresses.  A Dynamic IP address will be provided to any MAC address that does not have a reservation allocated to it. A reserved address can be issued to a nominated MAC address.
0
 
LVL 1

Author Comment

by:eng-sabri
ID: 24846883
thank you DCMBS ..

but I think Limitation/Handling offering IP's this is DHCP business because it depend on MAC to offer this service to it must me handle MAC's ,, I think I sow this function in Windows DHCP server

so ..

Do you have Ideas ?
0
 
LVL 9

Expert Comment

by:DCMBS
ID: 24847295
I have never seen this as part of a DHCP server in any O/S.  Even in wireless routers the MAC filtering function is seperate from DHCP.  Someone may come along and contradict me but in my experience I have never seen this.
0

Featured Post

NFR key for Veeam Backup for Microsoft Office 365

Veeam is happy to provide a free NFR license (for 1 year, up to 10 users). This license allows for the non‑production use of Veeam Backup for Microsoft Office 365 in your home lab without any feature limitations.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Backup DHCP Server 8 127
DHCP DNS Set up 4 90
How to transition DHCP role from Cisco Layer 3 Switch (Core) to Windows Server DHCP 4 53
WDS can't PXE boot 3 26
This document is written for Red Hat Enterprise Linux AS release 4 and ORACLE 10g.  Earlier releases can be installed using this document as well however there are some additional steps for packages to be installed see Metalink. Disclaimer: I hav…
The purpose of this article is to fix the unknown display problem in Linux Mint operating system. After installing the OS if you see Display monitor is not recognized then we can install "MESA" utilities to fix this problem or we can install additio…
The Email Laundry PDF encryption service allows companies to send confidential encrypted  emails to anybody. The PDF document can also contain attachments that are embedded in the encrypted PDF. The password is randomly generated by The Email Laundr…
How to Install VMware Tools in Red Hat Enterprise Linux 6.4 (RHEL 6.4) Step-by-Step Tutorial

740 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question