dhcp server liuxLinux serverNETWORK ADMINISTRATIONS

How to set up a DHCP server on Ubuntu OS

How to set up a DHCP server on Ubuntu OS

0:00 – Introduction
0:33 – Give your server a static IP address
2:44 – Install DHCP server
4:12 – Configure Server
7:28 – Restart Server – Now the DHCP Server will run properly
9:11 – Install and configure Firewall
10:51 – Scan new computer for vulnerabilities – Path if necessary

1. Download Ubuntu ISO from the website below:
https://ubuntu.com/download
2. Then you will need to install Virtual Box using the instructions linked below:
https://www.wikihow.com/Install-VirtualBox
3. Open Virtual Box and select “new.”
Name: “Ubuntu DNS server 1”
Machine Folder: Your VM folder
Type: Linux
Version: Ubuntu 64-bit
Memory Size: 4 GB
Hard Disk: Create a virtual Hard Disk Now
File Size: At least 30 GB
Hard Disk File type: VDI
Storage on physical hard disk: Fixed Size
Then Click on Create.
4. Open the Settings for that new virtual machine. Navigate to the network tab. Click on the “adapter 1” tab and change the attached to setting to “bridged adapter.” Then click OK.
5. Start the new Virtual Machine. Navigate and Select the Ubuntu ISO that you downloaded. Then click on Start.
6. Select your language and then click on “Install Ubuntu.” Select your keyboard layout. Updates and other software = Normal, Other options = both boxes selected. Installation type = Erase Disk and install Ubuntu. Select your region. Enter your computer name, username, password. Select Log in Automatically to make it easier. Password should be at least 12 characters long with at least one number, one special character, one uppercase letter, and one lowercase letter. Restart server and remove ISO.
7. Bring up the terminal and use the following command to install guest additions.
sudo apt-get install virtualbox-guest-additions-iso
enter password
press “y” and “enter” to install
Resize resolution inside your virtual machine to machine your monitor.

8. sudo apt install isc-dhcp-server
9.sudo nano /etc/dhcp/dhcpd.conf

Enter Server information for your network here
# minimal sample /etc/dhcp/dhcpd.conf
default-lease-time 600;
max-lease-time 7200;

subnet 192.168.1.0 netmask 255.255.255.0 {
range 192.168.1.150 192.168.1.200;
option routers 192.168.1.254;
option domain-name-servers 192.168.1.1, 192.168.1.2;
option domain-name “mydomain.example”;
}

10. sudo nano /etc/default/isc-dhcp-server
Add your ethernet name here
INTERFACESv4=”eth4″

11. After changing the config files you have to restart the dhcpd service:

sudo systemctl restart isc-dhcp-server.service

12. Install firewall using the following now
sudo apt install ufw
sudo ufw enable
sudo ufw allow 67
sudo ufw allow 68

13. Last final step scan system with Kali.
nmap -sS -A –script “vuln,malware,version” ip_address_of_server

References
Dynamic Host Configuration Protocol (DHCP)
https://ubuntu.com/server/docs/network-dhcp

UFW tools
https://www.digitalocean.com/community/tutorials/ufw-essentials-common-firewall-rules-and-commands

source

by Telifox

linux dhcp server

Alice AUSTIN

Alice AUSTIN is studying Cisco Systems Engineering. He has passion with both hardware and software and writes articles and reviews for many IT websites.