Koozali.org: home of the SME Server

Force DHCP To Refuse Clients A DHCP Lease Depending On Client MAC Address

Offline hatsa

  • **
  • 25
  • +0/-0
Can I make my sme server refuse DHCP leases to clients Depending On Client MAC Address if i typed the mac address in the server the server will give him ip and if i didn't typed his mac the server will not give him ip

Offline David Harper

  • *
  • 653
  • +0/-0
  • Watch this space
    • Workgroup Technology Solutions
Re: Force DHCP To Refuse Clients A DHCP Lease Depending On Client MAC Address
« Reply #1 on: December 23, 2008, 05:26:15 AM »
You can do this by deploying custom templates for the dhcpd configuration files. But it is quite complicated and messy; SME Server is not really designed for this kind of thing.

Offline cactus

  • *
  • 4,880
  • +3/-0
    • http://www.snetram.nl
Re: Force DHCP To Refuse Clients A DHCP Lease Depending On Client MAC Address
« Reply #2 on: December 23, 2008, 09:09:12 AM »
Can I make my sme server refuse DHCP leases to clients Depending On Client MAC Address if i typed the mac address in the server the server will give him ip and if i didn't typed his mac the server will not give him ip
May I ask what you are trying to do? Are you trying to manage a wireless network through SME Server. If so you might be better of connecting a wireless router to the WAN side and list allowed MAC addresses in there. I have this setup myself as well. I use a wireless router with fixed ports as well and have defined the IP range it hands out as a additional local network on my SME Server.
Be careful whose advice you buy, but be patient with those who supply it. Advice is a form of nostalgia, dispensing it is a way of fishing the past from the disposal, wiping it off, painting over the ugly parts and recycling it for more than its worth ~ Baz Luhrmann - Everybody's Free (To Wear Sunscreen)

Offline hatsa

  • **
  • 25
  • +0/-0
Re: Force DHCP To Refuse Clients A DHCP Lease Depending On Client MAC Address
« Reply #3 on: December 24, 2008, 12:15:52 AM »
do u mean sme server cant do this i dont think so

Offline David Harper

  • *
  • 653
  • +0/-0
  • Watch this space
    • Workgroup Technology Solutions
Re: Force DHCP To Refuse Clients A DHCP Lease Depending On Client MAC Address
« Reply #4 on: December 24, 2008, 12:32:37 AM »
I don't understand your question. Either you can deploy custom templates or use the configuration suggested by cactus.

Offline CharlieBrady

  • *
  • 6,918
  • +3/-0
Re: Force DHCP To Refuse Clients A DHCP Lease Depending On Client MAC Address
« Reply #5 on: December 24, 2008, 04:31:32 AM »
You can do this by deploying custom templates for the dhcpd configuration files. But it is quite complicated and messy; SME Server is not really designed for this kind of thing.

No, it's much simpler than that. Configure SME server to only offer N leases via DHCP (using console) and configure each of the N leases to match a specific MAC address, via the Hostnames and Addresses panel.

Offline David Harper

  • *
  • 653
  • +0/-0
  • Watch this space
    • Workgroup Technology Solutions
Re: Force DHCP To Refuse Clients A DHCP Lease Depending On Client MAC Address
« Reply #6 on: December 24, 2008, 05:52:49 AM »
Sweet, thanks for the tip!

Offline hatsa

  • **
  • 25
  • +0/-0
Re: Force DHCP To Refuse Clients A DHCP Lease Depending On Client MAC Address
« Reply #7 on: December 25, 2008, 04:38:27 AM »
plz CharlieBrady can  you explain it more than this

Offline Reinhold

  • *
  • 517
  • +0/-0
    • http://127.0.0.1

Offline hatsa

  • **
  • 25
  • +0/-0
Re: Force DHCP To Refuse Clients A DHCP Lease Depending On Client MAC Address
« Reply #9 on: December 28, 2008, 03:14:04 AM »
thanx Reinhold but this is the half answer plz now i know how to give the clinet the same ip by the clint MAC Address in the hostnames but i want now the clints that i didn't Add them MAC Adderss the internet will notwork on the clint computer till i add his MAC Address in the host names plz plz plz some body tell me how i want it veryyyy much some body help me plz

Offline cactus

  • *
  • 4,880
  • +3/-0
    • http://www.snetram.nl
Re: Force DHCP To Refuse Clients A DHCP Lease Depending On Client MAC Address
« Reply #10 on: December 28, 2008, 09:46:20 AM »
thanx Reinhold but this is the half answer plz now i know how to give the clinet the same ip by the clint MAC Address in the hostnames but i want now the clints that i didn't Add them MAC Adderss the internet will notwork on the clint computer till i add his MAC Address in the host names plz plz plz some body tell me how i want it veryyyy much some body help me plz
The answer is in the posts in this forum. If you list all allowed hosts in the hostname panel by MAC address and do limit the DHCP range to the number of hosts added there no other IP addresses should be handed out, hence no connection should be possible to the network. If it does launch a bug report please.
Be careful whose advice you buy, but be patient with those who supply it. Advice is a form of nostalgia, dispensing it is a way of fishing the past from the disposal, wiping it off, painting over the ugly parts and recycling it for more than its worth ~ Baz Luhrmann - Everybody's Free (To Wear Sunscreen)

Offline hatsa

  • **
  • 25
  • +0/-0
Re: Force DHCP To Refuse Clients A DHCP Lease Depending On Client MAC Address
« Reply #11 on: December 28, 2008, 12:25:21 PM »
this is not what i mean cactus i mean if i have 20 clints and and i made the range from 1 to 254 ok any one plug acable in any switch will have access to the internet right i didn't want this i know what you meen cactus you have choose the easy way but what i want to do the dhcp server dont give ip's to any one only the mac address in the hostnames i dont want to controle it from the range i want to control it from the dhcp server and thanx for your litil help

Offline cactus

  • *
  • 4,880
  • +3/-0
    • http://www.snetram.nl
Re: Force DHCP To Refuse Clients A DHCP Lease Depending On Client MAC Address
« Reply #12 on: December 28, 2008, 12:32:11 PM »
this is not what i mean cactus i mean if i have 20 clints and and i made the range from 1 to 254 ok any one plug acable in any switch will have access to the internet right i didn't want this i know what you meen cactus you have choose the easy way but what i want to do the dhcp server dont give ip's to any one only the mac address in the hostnames i dont want to controle it from the range i want to control it from the dhcp server and thanx for your litil help
There is no solution for that AFAIK. Why would you setup such a broad range as you are not allowing only known hosts access anyway? It is just a matter of increasing the DHCP range for every MAC address you ad in the hostname panel when doing the management.
Be careful whose advice you buy, but be patient with those who supply it. Advice is a form of nostalgia, dispensing it is a way of fishing the past from the disposal, wiping it off, painting over the ugly parts and recycling it for more than its worth ~ Baz Luhrmann - Everybody's Free (To Wear Sunscreen)

Offline nakor_au

  • *
  • 18
  • +0/-0
Re: Force DHCP To Refuse Clients A DHCP Lease Depending On Client MAC Address
« Reply #13 on: December 28, 2008, 12:42:26 PM »
I think he/she might have different computers/devices pluging into the network, and just making the scope bigger each time will not fix the problem.

Offline Stefano

  • *
  • 10,894
  • +3/-0
Re: Force DHCP To Refuse Clients A DHCP Lease Depending On Client MAC Address
« Reply #14 on: December 28, 2008, 12:52:28 PM »
Hi

what the OP wants it's (IMO) a captive portal or something similar.

I don't remember if SME has such a functionality, but I think that something like m0n0wall it's the rigth tool

my 2c

ciao
Stefano