[gentoo-user] DHCP and Deny specific Mac Addr IPs
Hi All, In my current situation, my home network has 1 DHCP server for all the clients on the home network. My laptop, also runs a dhcp server, for when I use my laptop as a firewall/router at work. (no HUB/switch available) WHen I get home and I plug into the home-network, a newly booted up PC will contact my laptop's DHCP for an address rather than the Home network's DHCP server. The question is, how can I deny these Home-PCs access to my laptop's DHCP server. I know of the deny config for pool addreses, but it's not horribly clear how this is done. Would appreciate a few pointers -- Ow Mun Heng Gentoo/Linux on DELL D600 1.4Ghz 1.5GB RAM 98% Microsoft(tm) Free!! Neuromancer 22:52:39 up 6 days, 7:19, 7 users, load average: 0.81, 0.78, 1.09 -- gentoo-user@gentoo.org mailing list
Re: [gentoo-user] DHCP and Deny specific Mac Addr IPs
On 27 April 2006 15:55, Ow Mun Heng wrote: Hi All, In my current situation, my home network has 1 DHCP server for all the clients on the home network. My laptop, also runs a dhcp server, for when I use my laptop as a firewall/router at work. (no HUB/switch available) WHen I get home and I plug into the home-network, a newly booted up PC will contact my laptop's DHCP for an address rather than the Home network's DHCP server. The question is, how can I deny these Home-PCs access to my laptop's DHCP server. I know of the deny config for pool addreses, but it's not horribly clear how this is done. Wouldn't it be the best solution to shut the dhcp server on you laptop down when you are at home? Uwe -- Why do consumers keep buying products they will live to curse? -- gentoo-user@gentoo.org mailing list
Re: [gentoo-user] DHCP and Deny specific Mac Addr IPs
On Thu, 2006-04-27 at 16:24 +, Ognjen Bezanov wrote: On Thursday 27 April 2006 15:10, Uwe Thiem wrote: On 27 April 2006 15:55, Ow Mun Heng wrote: Hi All, In my current situation, my home network has 1 DHCP server for all the clients on the home network. My laptop, also runs a dhcp server, for when I use my laptop as a firewall/router at work. (no HUB/switch available) WHen I get home and I plug into the home-network, a newly booted up PC will contact my laptop's DHCP for an address rather than the Home network's DHCP server. The question is, how can I deny these Home-PCs access to my laptop's DHCP server. I know of the deny config for pool addreses, but it's not horribly clear how this is done. Wouldn't it be the best solution to shut the dhcp server on you laptop down when you are at home? Uwe I agree. I have an DNS and DHCP server on my laptop (for when I am at Uni, so I can act as a gateway/server for a WLAN). Yes, while those are perfectly valid solutions and I do utilise such a solution for me when I switch from Home to Work/Work to Home. (which does not cover yet DHCP) I'm hoping that there is a better way via a deny script for mac addrs. -- Ow Mun Heng Gentoo/Linux on DELL D600 1.4Ghz 1.5GB RAM 98% Microsoft(tm) Free!! Neuromancer 23:46:51 up 6 days, 8:13, 7 users, load average: 1.24, 1.39, 1.45 -- gentoo-user@gentoo.org mailing list
Re: [gentoo-user] DHCP and Deny specific Mac Addr IPs
Ow Mun Heng wrote: Yes, while those are perfectly valid solutions and I do utilise such a solution for me when I switch from Home to Work/Work to Home. (which does not cover yet DHCP) I'm hoping that there is a better way via a deny script for mac addrs. Do you reboot when you go from work to home? If so, have two grub kernel entries. Label one entry Home and the other Work. Have the Home kernel entry have an extra kernel command line option like so: title=Gentoo Linux (Home) root (hd0,0) kernel /boot/kernel-2.6.15-gentoo-r1 root=/dev/sda1 NO-DHCP extra boot option ^^^ Now just modify your /etc/init.d/ script for DHCP to look for NO-DHCP in /proc/cmdline. Now you can use grep: grep NO-DHCP /proc/cmdline FOUND=$? if [ $FOUND -eq 0 ]; then # NO-DHCP was found in boot cmdline, don't start DHCP else # NO-DHCP was NOT found in boot cmdline, start DHCP fi I have never had a need to run a DHCP server so there is probably a way to do it with DHCP. However, this is Linux and Linux was made for tinkering, so use whatever you like best. : ) Jim -- gentoo-user@gentoo.org mailing list