Linux - Security This forum is for all security related questions.
Questions, tips, system compromises, firewalls, etc. are all included here. |
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
 |
01-03-2006, 03:11 AM
|
#1
|
LQ Newbie
Registered: Sep 2005
Posts: 2
Rep:
|
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 ?
|
|
|
01-03-2006, 09:11 AM
|
#2
|
LQ Newbie
Registered: Nov 2005
Location: London
Distribution: Debian
Posts: 17
Rep:
|
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)
|
|
|
01-04-2006, 02:05 AM
|
#3
|
LQ Newbie
Registered: Sep 2005
Posts: 2
Original Poster
Rep:
|
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.
|
|
|
01-04-2006, 09:24 AM
|
#4
|
LQ Guru
Registered: Jul 2003
Location: Los Angeles
Distribution: Ubuntu
Posts: 9,870
|
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...
|
|
|
01-04-2006, 10:10 AM
|
#5
|
Member
Registered: Sep 2003
Location: Michigan
Distribution: Gentoo, Knoppix
Posts: 69
Rep:
|
Not exactly sure if this is what your trying to accomplish, but check out NetReg
http://www.netreg.org/
|
|
|
01-04-2006, 11:11 AM
|
#6
|
Member
Registered: Apr 2005
Location: Jordan
Distribution: Debian (Sarge), Ubuntu (6.06)
Posts: 271
Rep:
|
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.
|
|
|
01-04-2006, 09:39 PM
|
#7
|
Senior Member
Registered: Sep 2002
Location: Nashville, TN
Posts: 1,552
Rep:
|
You could assign new/unknown MAC addresses to a subnet that has limited network access (ie access only to a jumpstart or patch server).
|
|
|
All times are GMT -5. The time now is 10:03 PM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|