# docker DHCP Server

{% embed url="<https://hub.docker.com/r/djaydev/glass-isc-dhcp>" %}

```
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

```

![](/files/-Lp64OrKZd2_MjYV0Rnf)

預設帳號密碼:glassadmin : glassadmin

![](/files/-Lp6AdTpdFSQ_EUa4mqQ)

![](/files/-Lp6CI340rp7uD_t3HOL)

找出網段中的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
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://kawsing.gitbook.io/opensystem/docker-cong-an-zhuang-dao-ying-yong-ru-men-pian/docker-dhcp-server.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
