Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/theoneoh1/autodhcp

Automating DHCP Server configuration with Bash
https://github.com/theoneoh1/autodhcp

automation bash bash-script dhcp dhcp-server dhcpd network networking

Last synced: about 1 month ago
JSON representation

Automating DHCP Server configuration with Bash

Awesome Lists containing this project

README

        

# AutoDHCP

- Automating DHCP Server configuration with Bash
- Client Configuration is not mentioned here as it has to be done manually
- As of now you have to manually install the DHCP package with
`sudo apt install isc-dhcp-server`

### How to use?

- You can directly use the code or clone the repo

``bash AutoDHCPilot.sh``

- It will ask for details to that to be filled out by user and configuration will be automated

> - Provide Domain Name
> - Provide Subnet (eg. 192.168.80.0)
> - Provide Option Routers (eg. 192.168.80.1)
> - Provide IP Pool with Starting and Ending IP address

- At the end it will show which IP has been assigned yet.

### Output

![](https://github.com/TheOneOh1/AutoDHCP/blob/main/carbon%20(1).png)

### Client Side

- First check the network interface of client machine (eg. ens33, eth0)
- Open the Interfaces file
`sudo nano /etc/network/interfaces`
And enter the following details
```
auto
iface inet dhcp
```
- Once done restart the network or reboot the system
`systemctl restart networking`
`dhclient -4`