Cloudflare Docs
Magic WAN
Edit this page
Report an issue with this page
Log into the Cloudflare dashboard
Set theme to dark (⇧+D)

DHCP server

When you use a static IP address, Magic WAN Connector can also act as a DHCP server in your network. To enable this feature:

  1. Log in to the Cloudflare dashboard and select your account.

  2. Go to Magic WAN > Sites.

  3. Select your site > Edit.

  4. Select Network.

  5. In LAN configuration, select the LAN where you want to enable DHCP server.

  6. Select Edit.

  7. Under Static addressing, select This is a DHCP Server. You also have to specify:

    • The DNS server address
    • The DHCP pool start
    • The DHCP pool end

    For example:

    An example of how to configure you Magic WAN Connector LAN

Create a PUT request to update the LAN where you want to enable DHCP server:

Example:

curl --request PUT \
--url https://api.cloudflare.com/client/v4/accounts/{account_id}/magic/sites/{site_id}/lans/{lan_id} \
--header 'Content-Type: application/json' \
--header 'X-Auth-Email: <EMAIL>' \
--header 'X-Auth-Key: <API_KEY>' \
--data '{
"lan": {
"static_addressing": {
"dhcp_server": {
"dhcp_pool_end": "<IP_ADDRESS>",
"dhcp_pool_start": "<IP_ADDRESS>",
"dns_server": "<IP_ADDRESS>"
}
}
}
}'