<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.pedromussato.com/index.php?action=history&amp;feed=atom&amp;title=Create_DHCP_server_on_Ubuntu</id>
	<title>Create DHCP server on Ubuntu - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.pedromussato.com/index.php?action=history&amp;feed=atom&amp;title=Create_DHCP_server_on_Ubuntu"/>
	<link rel="alternate" type="text/html" href="https://wiki.pedromussato.com/index.php?title=Create_DHCP_server_on_Ubuntu&amp;action=history"/>
	<updated>2026-04-10T13:05:54Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.42.3</generator>
	<entry>
		<id>https://wiki.pedromussato.com/index.php?title=Create_DHCP_server_on_Ubuntu&amp;diff=255&amp;oldid=prev</id>
		<title>413vhcu1lq0463ob: Created page with &quot;== 1. Install the DHCP Server ==  &lt;code&gt;sudo apt update  sudo apt install isc-dhcp-server -y&lt;/code&gt; ----  == 2. Set the network interface == Edit the default configuration file:  &lt;code&gt;sudo nano /etc/default/isc-dhcp-server&lt;/code&gt; Find this line:  &lt;code&gt;INTERFACESv4=&quot;&quot;&lt;/code&gt; And replace it with your actual network interface (for example &lt;code&gt;eth0&lt;/code&gt;, &lt;code&gt;ens33&lt;/code&gt;, or &lt;code&gt;enp0s3&lt;/code&gt;):  &lt;code&gt;INTERFACESv4=&quot;eth0&quot;&lt;/code&gt;  == 3. Configure the DHCP scope == Ed...&quot;</title>
		<link rel="alternate" type="text/html" href="https://wiki.pedromussato.com/index.php?title=Create_DHCP_server_on_Ubuntu&amp;diff=255&amp;oldid=prev"/>
		<updated>2025-10-18T11:52:22Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;== 1. Install the DHCP Server ==  &amp;lt;code&amp;gt;sudo apt update  sudo apt install isc-dhcp-server -y&amp;lt;/code&amp;gt; ----  == 2. Set the network interface == Edit the default configuration file:  &amp;lt;code&amp;gt;sudo nano /etc/default/isc-dhcp-server&amp;lt;/code&amp;gt; Find this line:  &amp;lt;code&amp;gt;INTERFACESv4=&amp;quot;&amp;quot;&amp;lt;/code&amp;gt; And replace it with your actual network interface (for example &amp;lt;code&amp;gt;eth0&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;ens33&amp;lt;/code&amp;gt;, or &amp;lt;code&amp;gt;enp0s3&amp;lt;/code&amp;gt;):  &amp;lt;code&amp;gt;INTERFACESv4=&amp;quot;eth0&amp;quot;&amp;lt;/code&amp;gt;  == 3. Configure the DHCP scope == Ed...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;== 1. Install the DHCP Server ==&lt;br /&gt;
 &amp;lt;code&amp;gt;sudo apt update&lt;br /&gt;
 sudo apt install isc-dhcp-server -y&amp;lt;/code&amp;gt;&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
== 2. Set the network interface ==&lt;br /&gt;
Edit the default configuration file:&lt;br /&gt;
 &amp;lt;code&amp;gt;sudo nano /etc/default/isc-dhcp-server&amp;lt;/code&amp;gt;&lt;br /&gt;
Find this line:&lt;br /&gt;
 &amp;lt;code&amp;gt;INTERFACESv4=&amp;quot;&amp;quot;&amp;lt;/code&amp;gt;&lt;br /&gt;
And replace it with your actual network interface (for example &amp;lt;code&amp;gt;eth0&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;ens33&amp;lt;/code&amp;gt;, or &amp;lt;code&amp;gt;enp0s3&amp;lt;/code&amp;gt;):&lt;br /&gt;
 &amp;lt;code&amp;gt;INTERFACESv4=&amp;quot;eth0&amp;quot;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== 3. Configure the DHCP scope ==&lt;br /&gt;
Edit the main configuration file:&lt;br /&gt;
 &amp;lt;code&amp;gt;sudo nano /etc/dhcp/dhcpd.conf&amp;lt;/code&amp;gt;&lt;br /&gt;
Replace the contents with something like this:&lt;br /&gt;
 &amp;lt;code&amp;gt;default-lease-time 600;&lt;br /&gt;
 max-lease-time 7200;&lt;br /&gt;
 authoritative;&lt;br /&gt;
 &lt;br /&gt;
 subnet 192.168.50.0 netmask 255.255.255.0 {&lt;br /&gt;
   range 192.168.50.10 192.168.50.100;&lt;br /&gt;
   option routers 192.168.50.1;&lt;br /&gt;
   option subnet-mask 255.255.255.0;&lt;br /&gt;
   option domain-name-servers 8.8.8.8, 1.1.1.1;&lt;br /&gt;
 }&amp;lt;/code&amp;gt;&lt;br /&gt;
Explanation:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;range&amp;lt;/code&amp;gt;: IP address pool to be handed out&lt;br /&gt;
* &amp;lt;code&amp;gt;routers&amp;lt;/code&amp;gt;: default gateway for clients&lt;br /&gt;
* &amp;lt;code&amp;gt;domain-name-servers&amp;lt;/code&amp;gt;: DNS servers provided to clients&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
== 4. Restart and enable the service ==&lt;br /&gt;
 &amp;lt;code&amp;gt;sudo systemctl restart isc-dhcp-server&lt;br /&gt;
 sudo systemctl enable isc-dhcp-server&amp;lt;/code&amp;gt;&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
== 5. Verify it’s running ==&lt;br /&gt;
Check the service status:&lt;br /&gt;
 &amp;lt;code&amp;gt;sudo systemctl status isc-dhcp-server&amp;lt;/code&amp;gt;&lt;br /&gt;
Check the leases file for assigned IPs:&lt;br /&gt;
 &amp;lt;code&amp;gt;tail -f /var/lib/dhcp/dhcpd.leases&amp;lt;/code&amp;gt;&lt;/div&gt;</summary>
		<author><name>413vhcu1lq0463ob</name></author>
	</entry>
</feed>