FREESCO 0.2.7

ID #1052

A hack to give out only static IP's based on MAC address

A hack by medowl

my wish : I wanted the dhcpd on FREESCO 027 only to give out ips to those MAC addresses I've put in my dhcpd.conf, so only static leases , no pool of ips for macs not regged on my server

my problem : in the standard 027 setup , you HAVE TO specify a range of ips otherwise the dhcp daemon wouldn't start

my previous solution : set the pool to one ip (192.168.99.99 192.168.99.99) and then block that ip...

our setup : we have a network with 2 other houses (nice long utp cable going underground thru out backyard), in all in all 3 houses are connected together , all having their own internet access,
and 3 dhcp daemons giving out the correct ips so ppl in another house woudn't connect over someone elses internet connection...

this worked fine till one of the houses got another type of internet connection , and ppl in that house started getting the 192.169.99.99 ip from our freesco server, which is blocked , thus no connection to the internet (and if it would not be blocked they would use the wrong inet connection)

so I needed to figure out a way to get the dhcpd running on freesco 027 without giving out ips to ppl not in the dhcpd.conf file...

I actually asked this question about 4 years ago on the forum, and found some other ppl who were actually looking for a same kinda sollution , but no one ever came up with a good answer... so here we go ...


the new sollution :

edit /rc/rc_dhcpd
and remove line 28 : range $5;


the red line:

        cat >>/etc/dhcpd.conf <<-EOF
                subnet $3 netmask $4 {
                range $5;
                option subnet-mask $4;
                option broadcast-address $2;
                option routers $6;


dunno how this is done on 032 , but i guess it would be pretty similar...
I hope someone finds this info useful

Last update: 2004-10-14 00:24
Author: medowl
Revision: 1.0

Print this record Print this record
Send to a friend Send to a friend
Show this as PDF file Show this as PDF file
Export as XML-File Export as XML-File

Please rate this entry:

Average rating: 4 from 5 (1 Votes )

completely useless 1 2 3 4 5 most valuable

You can comment on this entry