Install isc-dhcp-server.
sudo apt-get autoremove dnsmasq
sudo apt-get install isc-dhcp-server
Give your interface a fixed ip.
sudo nano /etc/network/interfaces
#
auto eth0
iface eth0 inet static
address 192.168.1.1
netmask 255.255.255.0
gateway 192.168.1.1
Setting isc-dhcp-server to use eth0
sudo nano /etc/default/isc-dhcp-server
#
INTERFACES="eth0"
DHCPD_CONF=/etc/dhcp/dhcpd.conf
Setting up the dhcpd.conf for eth0, comment out everything else
sudo nano /etc/dhcp/dhcpd.conf
#
ddns-update-style none;
log-facility local7;
#
subnet 192.168.1.1 netmask 255.255.255.0 {
#
range 192.168.1.10 192.168.1.20;
option routers 192.168.1.1; #this is the gateway ip for your clients
option subnet-mask 255.255.255.0;
option broadcast-address 192.168.1.255;
option domain-name-servers 8.8.8.8, 208.67.222.222, 192.168.1.1; #ns.exapmle.org
default-lease-time 86400;
max-lease-time 86400;
}
To test check your syslog while running:
sudo service isc-dhcp-server start
WindyCityTech Blogger
WindyWindyCityTech Wordpress
No comments:
Post a Comment