So, I'm trying to share my internet connection via the built in wireless connection on my powerbook. A couple people with Linux laptops have tried to connect, but only people with macs have met with success. It appears that DHCP requests aren't being answered. So, I tried the steps detailed in this thread, but dhcpd can not bind to the interface...
<snip>
frisbee:/etc root# dhcpd en1
Internet Systems Consortium DHCP Server V3.0.4
Copyright 2004-2006 Internet Systems Consortium.
All rights reserved.
For info, please visit http://www.isc.org/sw/dhcp/
Wrote 0 leases to leases file.
Listening on BPF/en1/00:0a:95:f4:fa:fe/10.0.2/24
Sending on BPF/en1/00:0a:95:f4:fa:fe/10.0.2/24
Can't bind to dhcp address: Address already in use
Please make sure there is no other dhcp server
running and that there's no entry for dhcp or
bootp in /etc/inetd.conf. Also make sure you
are not running HP JetAdmin software, which
includes a bootp server.
</snip>
Any ideas on how to get this thing to hand out DHCP over the wireless connection?
OS X 10.4.7, 15" Aluminum Powerbook 1.25 GHz.
Quote:
Originally Posted by chrispy987 Thanks to kilowatt for getting me started on this. My solution is pretty barbones, but it works for me.
1. Download the DHCP code from http://www.isc.org/.
2. Expand the package. I used /sbin as the directory.
sudo tar xcvf dhcp-X.XX
3. Change in to the new directory.
4. Build and install the package.
sudo ./configure
sudo make
sudo make install
5. Add dhcp.plist to /System/Library/LaunchDaemons Code: <?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Label</key>
<string>org.isc.dhcpd</string>
<key>OnDemand</key>
<false/>
<key>ProgramArguments</key>
<array>
<string>/usr/sbin/dhcpd</string>
</array>
<key>RunAtLoad</key>
<true/>
<key>UserName</key>
<string>root</string>
</dict>
</plist>
This is configured to launch on start up.
6. Configure dhcpd.conf
Here's a verison of what I used: Sample 1 Code: ## /etc/dhcpd.conf file
## compiled by the infamous super-hacker unix guru kilowatt from macosx.com (you need this in the file for things to work :p )
## tweaked for fixed addresses by Chrispy.
option domain-name "Your_domain.com";
option domain-name-servers 66.66.77.88, 66.66.77.89;
##Check ddns?
ddns-update-style ad-hoc;
Authoritative;
##define the Subnet to be served.
subnet 192.168.1.0 netmask 255.255.255.0 {
##Define the DHCP address range to be served.
range 192.168.1.50 192.168.1.90;
default-lease-time 300000;
max-lease-time 350000;
option routers 192.168.1.1;
}
## Fixed IP addresses the name isn't too important. Just match the MAC address (hardware ethernet) the fixed-address to use. Watch the semicolons.
host comp1 {
hardware ethernet 00:11:22:33:44:55;
fixed-address 192.168.1.2;
}
host comp2 {
hardware ethernet 00:aa:bb:cc:dd:ee;
fixed-address 192.168.1.3;
}
host comp3 {
hardware ethernet 00:ee:dd:cc:bb:aa;
fixed-address 192.168.1.4;
}
host router {
hardware ethernet 00:aa:11:bb:22:cc;
fixed-address 192.168.1.1;
}
Now dhcp should be availalbe using the service command, and you should be able to start and stop it normally. It should also launch at start up. If you want to turn it off, just edit the .plist. |