docker DHCP Server

docker run -d --name=glass-isc-dhcp --network="host" -e TZ=Asia/Taipei -v /docker/appdata/glass-isc-dhcp:/etc/dhcp:rw -v /docker/appdata/glass-isc-dhcp/leases:/var/lib/dhcp:rw -e ADMINPASSWORD=glassadmin -e WEBSOCKETPORT=8080 -e WEBADMINPORT=3000 djaydev/glass-isc-dhcp
docker rm glass-isc-dhcp
cd /docker/appdata/glass-isc-dhcp/
sudo wget https://raw.githubusercontent.com/djaydev/docker-glass-isc-dhcp/master/sample.dhcpd.conf
sudo cp sample.dhcpd.conf dhcpd.conf
docker run -d --name=glass-isc-dhcp --network="host" -e TZ=Asia/Taipei -v /docker/appdata/glass-isc-dhcp:/etc/dhcp:rw -v /docker/appdata/glass-isc-dhcp/leases:/var/lib/dhcp:rw -e ADMINPASSWORD=glassadmin -e WEBSOCKETPORT=8080 -e WEBADMINPORT=3000 djaydev/glass-isc-dhcp

預設帳號密碼:glassadmin : glassadmin

找出網段中的DHCP SERVER,使用nmap提出臨時要求

Response 1 of 1,得到臨時IP:192.168.43.185,Server是192.168.43.1

sudo nmap --script broadcast-dhcp-discover -e wlan0
Starting Nmap 7.70 ( https://nmap.org ) at 2019-09-19 10:25 CST
Pre-scan script results:
| broadcast-dhcp-discover:
|   Response 1 of 1:
|     IP Offered: 192.168.43.185
|     DHCP Message Type: DHCPOFFER
|     Server Identifier: 192.168.43.1
|     IP Address Lease Time: 2m00s
|     Renewal Time Value: 1m00s
|     Rebinding Time Value: 1m45s
|     Subnet Mask: 255.255.255.0
|     Broadcast Address: 192.168.43.255
|     Domain Name Server: 192.168.43.1
|     WPAD:
|
|_    Router: 192.168.43.1
WARNING: No targets were specified, so 0 hosts scanned.
Nmap done: 0 IP addresses (0 hosts up) scanned in 9.13 seconds

Last updated