Port 67 (DHCP)

Port 67 is the server port of DHCP (Dynamic Host Configuration Protocol), the service that automatically hands out IP addresses and network settings to…

Key facts

Port
67
Protocols
UDP
Range
System port (Well-Known), 0-1023
IANA service name
bootps

IANA assigns ports in this range to well-known services, under RFC 6335.

About port 67

Port 67 is the server port of DHCP (Dynamic Host Configuration Protocol), the service that automatically hands out IP addresses and network settings to computers and devices on a network. It runs over UDP.

According to RFC 2131, DHCP messages from a client to the server are sent to port 67, and replies from the server to the client are sent to port 68, the client port. DHCP is based on the older BOOTP protocol, which is why IANA registers port 67 for the bootps service and port 68 for the bootpc service.

What port 67 is used for

  • Assigning addresses on a network: the router or DHCP server gives every device that connects an IP address, a subnet mask, a default gateway, and DNS servers.
  • A fixed address for a device: an address is reserved (a reservation) based on the device's MAC address, for example for a printer or a server on the office network.
  • Large networks: a DHCP Relay service on the router forwards requests to a central DHCP server on another network, on port 67.

Port 67 in the firewall

Open port 67 only on the server that hands out addresses, and only on the internal network interface that faces the devices on the network, for example eth1:

  • UFW: ufw allow in on eth1 to any port 67 proto udp
  • firewalld: firewall-cmd --permanent --zone=internal --add-service=dhcp

A web server, or a VPS that gets its address from somewhere else, doesn't need port 67 open to incoming traffic, and there is no reason to open it to the internet.

Risks and security

DHCP runs inside the local network, and the main risk is an extra, unauthorized DHCP server that hands devices wrong settings, such as a different gateway or DNS server. These settings protect the network:

  • Turn on DHCP Snooping on managed switches, so that only the port connected to the authorized server can answer requests.
  • Run the DHCP service only on the internal network interface, never on the interface that faces the internet.
  • Check from time to time which DHCP servers answer on the network, for example with nmap.
  • Reserve fixed addresses for servers and important network equipment, so you can quickly spot an unfamiliar device.

Commands to check and configure

  • ss -ulnp | grep ':67 '

    Checks whether a DHCP service is listening on port 67 on the server, and which process it is (requires root privileges).

  • tcpdump -ni eth0 port 67 or port 68

    Shows the DHCP messages passing through the network interface, between the devices and the server (requires root privileges).

  • nmap --script broadcast-dhcp-discover

    Sends a DHCP request to the network and shows which DHCP servers answer, and the settings they hand out (requires root privileges).

  • ipconfig /all

    On a Windows computer, shows the DHCP server address, the address received, and when the lease expires.

  • ipconfig /renew

    On a Windows computer, requests a new address from the DHCP server.

  • ufw allow in on eth1 to any port 67 proto udp

    Opens port 67 only on the internal network interface eth1 (UFW).

  • firewall-cmd --permanent --zone=internal --add-service=dhcp

    Opens the DHCP service in firewalld in the internal zone, which the internal network interface belongs to. Then run firewall-cmd --reload.

Port 67 in the IANA registry

Port Protocol Service IANA registry description
67 TCP bootps Bootstrap Protocol Server
67 UDP bootps Bootstrap Protocol Server

Data source: IANA Service Name and Transport Protocol Port Number Registry (opens in a new tab)

Port 67 FAQ

What's the difference between port 67 and port 68?

Port 67 is the DHCP server port, which receives the requests, and port 68 is the port of the device that asks for an address and receives the reply. Both ports run over UDP.

Do I need to open port 67 on a VPS?

No. A VPS doesn't hand out addresses to other devices, so there is no need to open port 67 to incoming traffic. Open it only on a server that acts as the DHCP server on an internal network.

How do I give a device on the network a fixed IP address?

In the DHCP server or router settings, set up an address reservation based on the device's MAC address. The device keeps getting its address automatically, but always the same one.

Why does my computer get an address starting with 169.254?

A computer that gets no reply from a DHCP server assigns itself an address from the 169.254.0.0/16 range. Check the network connection and the DHCP server, then request a new address with ipconfig /renew. The Reserved IP ranges page explains this range.

Shopping cart

Your cart is emptyYou can start with one of our popular plans.

Site search

Accessibility

Text size
100%
Accessibility statement