LinuxQuestions.org
Visit the LQ Articles and Editorials section
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices

Reply
 
Search this Thread
Old 03-18-2005, 04:42 AM   #1
alithenake
LQ Newbie
 
Registered: Feb 2005
Location: Bucharest, Romania
Distribution: Slack 10.1
Posts: 4

Rep: Reputation: 0
DHCP with fixed IPs


Hello guys

Please, can you give me any advice regarding this problem: I would like to set-up a network with the following settings:

1. A Slackware 10.1 server connected to Internet with 2 NICs. One to the Internet, the other to the internal network.

2. on the Green interface (internal network) I want to set up a DHCP

3. a client that is connected to the internal network, based on his MAC address will receive always the same IP

4. also, I must have an allow list and only the MACs from that allow list will receive an IP and will connect to internet. Other MACs must be refused and not be granted access to internet.

How to do that ?

Thanks in advance.
 
Old 03-18-2005, 05:52 AM   #2
egag
Senior Member
 
Registered: Jul 2004
Location: Netherlands
Distribution: Slackware
Posts: 2,721

Rep: Reputation: 52
on the server you can run dnsmasq: it's a dhcp- and cashing dns- server.
it's easy to setup, just take a look at the file /etc/dnsmasq.conf.
edit that file ( there are many examples there ), and make /etc/rc.d/rc.dnsmasq executable.

you'll also have to configure ip-tables to forward package from eth0 to eth1 and vv.

egag
 
Old 03-18-2005, 07:53 AM   #3
wes103
LQ Newbie
 
Registered: Sep 2004
Location: Eastern Pennsylvania, US
Distribution: Slackware
Posts: 21

Rep: Reputation: 15
Well, for question 2, you could use dhcpd from http://www.isc.org. You can limit what interfaces it listens on by adding them to the startup commandline, ie "dhcpd eth2".

As for question 3, in their dhcpd v2.0pl5 (admittedly very old, but still does what I need) you would add a line like:

host mymachine {
hardware ethernet XX:XX:XX:XX:XX:XX;
fixed-address YYY.YYY.YYY.YYY;
}

Where mymachine is pretty much just a name field for your sake, but the X's need to change to the MAC address you want fixed, and the Y's need to be the IP address you want to fix it to.

Question 4 seems to want to use the allow and deny keywords mentioned in the man page for dhcpd.conf. I've not used it myself, so can't do much more than point you at it.

-Bill
 
Old 03-18-2005, 08:50 AM   #4
alithenake
LQ Newbie
 
Registered: Feb 2005
Location: Bucharest, Romania
Distribution: Slack 10.1
Posts: 4

Original Poster
Rep: Reputation: 0
actually I managed to do all points, except the allow list .. this is what bothers me... any help on that (with a little example?)

regards
 
Old 03-18-2005, 09:02 AM   #5
killerbob
Member
 
Registered: Oct 2004
Location: Ottawa, ON
Distribution: Slackware
Posts: 662

Rep: Reputation: 30
In dhcpd.conf, you'll probably have a line like:
Code:
allow unknown-clients;
Just change that to:
Code:
deny unknown-clients;
and it should work. If you don't have that line, add it anywhere in your subnet declaration.

Assuming you're using dhcpd. check out "man dhcpd.conf" for more examples of what you can do with it, such as having a specific IP pool for unknown clients, and a completely different pool for known clients. That can be useful, if you're trying to restrict access to your file and print servers, but want to be able to have lan parties where your friends will be able to access the 'net.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
2 DHCP IPs, one NIC? lil_drummaboy Linux - Networking 1 10-24-2005 03:36 PM
DHCP and Multiple IPs Matir Linux - Networking 0 02-23-2005 02:28 PM
Fixed IP Address with DHCP dgreenbean Linux - Networking 9 09-19-2004 01:12 PM
Changing dhcp ip -> fixed ip Lakani Linux - Networking 0 05-05-2004 05:32 AM
Reasons to change fixed IPs in our Lan to DHCP? mfeoli Linux - Networking 1 02-02-2004 11:34 PM


All times are GMT -5. The time now is 11:42 PM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration