LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Security
User Name
Password
Linux - Security This forum is for all security related questions.
Questions, tips, system compromises, firewalls, etc. are all included here.

Notices


Reply
  Search this Thread
Old 01-03-2006, 03:11 AM   #1
kriss3d
LQ Newbie
 
Registered: Sep 2005
Posts: 2

Rep: Reputation: 0
DHCP security


Im working on a project which I need to take security to the next level.

The core of what I need is this:

When a host requests a IP address from the DHCP server it needs to be given a temperary IP.
Then a script Im working on needs to be triggered to check the netbios name ( hosts are windows primary )
If the netbios names has not changed since last ( checking in a table of valid netbios names ) or if the name is allowed by a list, it will be all fine with the DHCP server.
If the netbios name is NOT allowed I need a way of the DHCP to retract the lease of the IP ( making it invalid somhow ) not just to the firewall, but to the network itself.

So in short: I need a way for the DHCP server to issue a temporary IP or somhow retract the IP given to a client making it unable to use the network untill that client reboots for another check.

Anyone ever done anything like that ?
 
Old 01-03-2006, 09:11 AM   #2
kbuk
LQ Newbie
 
Registered: Nov 2005
Location: London
Distribution: Debian
Posts: 17

Rep: Reputation: 0
Not done it,
Why not just set static addresses and set the dhcp server to only give out addresses to those with a static address (the mac addresses you know)
 
Old 01-04-2006, 02:05 AM   #3
kriss3d
LQ Newbie
 
Registered: Sep 2005
Posts: 2

Original Poster
Rep: Reputation: 0
Well i basicly need a dhcp which can be altered to run a script every time it offers a IP.
The project itself might sound stupid i know but its a part of a bigger plan here.

I need it to run a netbios namecheck every time a computer gets on the network as well as verify the mac and such.
 
Old 01-04-2006, 09:24 AM   #4
win32sux
LQ Guru
 
Registered: Jul 2003
Location: Los Angeles
Distribution: Ubuntu
Posts: 9,870

Rep: Reputation: 380Reputation: 380Reputation: 380Reputation: 380
why don't you just forget the temporary ip thing and instead just tell the dhcp server to give the clients the IP you want them to have depending on their mac address (the common method)??

as for the netbios, your dhcp server can also give them the address of the netbios name server, which could be on the same box/IP the dhcp server is running on... i assume the software one uses to serve netbios names to windows boxes is something samba-related but i'm not sure cuz i've never used netbios...

as for the making the IP unusable, i think you're beter off scripting something with iptables to handle that... like, the script could check the lease file, then cross-check with the netbios name server, and if things don't seem right then it would just add a DROP/REJECT rule to the FORWARD chain on the gateway for that source IP... so the client would need to get a new/proper lease in order to be able to connect to the outside world...

anyways, it's just a thought...
 
Old 01-04-2006, 10:10 AM   #5
paintcheck200
Member
 
Registered: Sep 2003
Location: Michigan
Distribution: Gentoo, Knoppix
Posts: 69

Rep: Reputation: 15
Not exactly sure if this is what your trying to accomplish, but check out NetReg

http://www.netreg.org/
 
Old 01-04-2006, 11:11 AM   #6
Notwerk
Member
 
Registered: Apr 2005
Location: Jordan
Distribution: Debian (Sarge), Ubuntu (6.06)
Posts: 271

Rep: Reputation: 31
Supposing you get it to work the way you want.

What happens AFTER the IP has been rejected?
The client can request a new IP
Code:
Windows>ipconfig /renew
and the whole process starts all over again... sounds like a good way to attack and DoS your dhcp server.
 
Old 01-04-2006, 09:39 PM   #7
stickman
Senior Member
 
Registered: Sep 2002
Location: Nashville, TN
Posts: 1,552

Rep: Reputation: 53
You could assign new/unknown MAC addresses to a subnet that has limited network access (ie access only to a jumpstart or patch server).
 
  


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
[Security Questions] Last Login, how good is this feature for security breach info? t3gah Linux - Security 2 06-14-2005 01:02 AM
DHCP Server security! cereal83 Linux - Security 1 05-13-2005 11:19 AM
wireless security with dhcp kevinms Linux - Security 2 04-03-2005 08:51 AM
dhcp + pppoe + kppp + security = confused aikidoist72 Linux - Networking 6 02-16-2005 04:45 PM
security on a dhcp network eflester Linux - Networking 2 08-17-2004 10:52 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Security

All times are GMT -5. The time now is 04:37 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