PDA

View Full Version : Toubleshooting DHCP server



Vrushali
2016-03-02, 09:18
Hi Team,
I have installed 4.3.0-kali1-amd64 on a physical machine. Dual boot with Win7 and Kali Linux.
Followed following steps to setup DHCP server on Kali Linux.

Installing dhcp server:
# apt-get install isc-dhcp-server

Define a static IP for the server
# nano /etc/network/interfaces

auto eth0
iface eth0 inet static
address 192.168.0.2 # server's IP address
netmask 255.255.255.0
network 192.168.0.0
broadcast 192.168.0.255
gateway 192.168.0.1 ‪#‎router‬'s IP address

Configure DHCP server settings at /etc/dhcp/dhcpd.conf
# nano /etc/dhcp/dhcpd.conf

default-lease-time 600;

max-lease-time 7200;
option domain-name-servers 192.168.1.1, 192.168.1.2;
option domain-name "yourdomainname.com";

subnet 192.168.0.0 netmask 255.255.255.0 {
range 192.168.0.150 192.168.0.200; ‪#‎Range‬ of client's IP addresses: 150 to 200
option subnet-mask 255.255.255.0;
option broadcast-address 192.168.0.255;
option routers 192.168.0.1;
}

Restart dhcp-server
# /etc/init.d/isc-dhcp-server restart

Restart eth0
‪#‎ifdown‬ eth0
‪#‎ifup‬ eth0

Check DHCP-server status
# /etc/init.d/isc-dhcp-server status

isc-dhcp-server.service - LSB: DHCP server
Loaded: loaded (/etc/init.d/isc-dhcp-server; bad; vendor preset:enabled)
Active: active (exited) since Tue 2016-03-01 16:47:55 IST; 21h ago
.
.
.

-------------------------------------------------------------------------------------------------------------------------

This machine is connected in a private network along with 1 WinXP machine and 1 Win7 machine. Both WinXP and Win7 machines are setup to get dynamic IP addresses.
Did a
ipconfig /release
and
ipconfig/renew
on both Win7 and WinXP machines.

However, these machines are not able to receive a new IP address from the DHCP server running on Kali Linux machine.

Is there some configuration that I am missing to get the DHCP server lease out addresses to clients connected to its network?

Thanks in advance!
Vrushali

Gh0sT.sh
2016-03-02, 11:36
how are this devices connected ?
i mean through hub ?
through straight through or cross over cables ?

Vrushali
2016-03-03, 04:10
how are this devices connected ?
i mean through hub ?
through straight through or cross over cables ?


Hi, Thanks for your reply!

The devices are connected through an Ethernet switch.
D-Link DES-1108V 10/100 Fast Ethernet Switch
Something like this - http://www.dlink.com/-/media/Business_Products/DES/DES%201008D/Manual/DES_1008D_Manual_EN_UK.pdf