how to install dhcp on debian VirtualBox


How to install dhcp on debian.

As root simply run


sudo apt-get install isc-dhcp-server


One we have installed the dhcp server now change the adaptor setting to internal network.  

 
Now we need to edit the file and add the interface /etc/default/isc-dhcp-server

 

After editing the file now we have to assign the static ip address to the system for this edit the file /etc/network/interfaces.

 
Restart he service o reload
                    sudo /etc/init.d/networking restart

                                    sudo /etc/init.d/networking reload




Here we can see that we got the static ip address



If you are using the debain server then it will work fine but in graphical maybe you will face the problem of NetworkManger so for this just fallow these steps.

Edit the file /etc/NetworkManager/NetworkManger.conf


Here you will find the line called managed=false just write it as true





Now we are going to to edit the dhcp configuration file. I recommended you to make a backup of the file and then start editing.



After making a backup now we have to edit the file.
 In that file we have to write the subnet,netmask,range and max lease time.



after editing the file now start the service.



                                  sudo /etc/init.d/isc-dhcp-server restart

Verify that the server is working

                                 ps -ef | grep dhcp


Verify the UDP port is 67

                                      netstat -ltun








Check the file concessions and verified that there are not yet any concession



We are done. Now we need to check that the server is working o no for this go to another system and make some changes.


Put the eth0 as dhcp




Restart the service

                  sudo service networking restart

Consult the ip:
                    ifconfig
























Comments

Popular posts from this blog

How to install coWPAtty 4.6 on Ubuntu?

Alpine

How to get the user name and password of Facebook with DNS spoofing ?