The ISC DHCP server has been declared End Of Life so there will be no further updates Instead use their Kea DHCP server, a video to install and configure the DHCPv4 server can be found here ua-cam.com/video/FGw06CSLizY/v-deo.html We're using the ISC DHCP Server for this; It comes with good examples and is easy to install and configure 00:00 Intro 00:35 Planning 04:01 Install & Configure DHCP 22:50 Test DHCP 27:40 DHCP Relay Agent
Fantastic video with very usefull side explanations about the options that are not being used, gives a clearer image of what i'm configuring. Thanks a lot!
It depends on the device as to where you should look, but the DHCP server stores the leases in the file /var/lib/dhcp/dhcpd.leases If you check that it will show you blocks of leases each beginning with the IP address So check the device to find what it's IP address is then check this file for that IP and the MAC will be in a line below, beginning with hardware ethernet
hello sir, i have a question about what interface did you used for the machine , I saw the interface like ens192 maybe it using nat or bridge or something adapter on virtual machine network configuration, you like install or configuration like 1 interface on your network system . so my second question is . how did you share your network if you used 1 interface . in many tutorials on youtube they'are like using 2 interface for example : 1 interface for sharing dhcp ISP ( internet resource). and the second interface like internal network. thankyou!! i hope you read my comment and be gratefully if you can answer my question:)
The VM I used was only given one interface I don't use NATed interfaces, only bridged ones so that each VM has direct network access As far as I recall, a NATed interface may be a common default option for desktop hypervisors like VirtualBox but not for Enterprise ones like ESXi for instance But any Ubuntu VM I create on this hypervisor will reference its NIC as ens192 So nothing gets done on my part to influence that naming I don't see any gain in having multiple network interfaces on a VM like this That's more for firewalls which have to service different networks directly An infrastructure server like this requires a production facing interface, which is used to allow DHCP clients to communicate with it and obtain IP addressing But it can also be used by the server itself to obtain updates from the Internet for instance, etc That interface would be in a network that is only accessible via a firewall, so any network has the potential to reach it, but only if the firewall allows it Typically the same firewall would be used to restrict management access as well as production access so there usually isn't any benefit in adding a management NIC to a VM So the VM will be managed via the same production interface but the hypervisor's own GUI could also be used to provide console access
Nice and easy, I just wish it had some sort of a web interface. Would be nice to see the leased IPs without having to ssh into the server and run a command
Yes, it is a lot different if you're used to say a Windows environment with a GUI As far as I'm aware, there are tools out there that can provide a front end interface for a Linux DHCP server But I haven't looked into that yet as my focus is on automation through scripting
@@TechTutorialsDavidMcKone You are right, I was using AdGuard as my DNS and DHCP server, however, it has an annoying limitation that its DHCP server always assigns its DNS server to the clients, and you can't even do a secondary server, so if you host machine is down, your internet is basically down. I install ISC DHCP on BSD Free and Virtual Box machine yesterday thanks to your instructions and it is great, way more control over what I can do, I can even assign different DNS serves to different devices. I ended up setting Webmin for a web interface and it works great.
I don't use pfSense as a DHCP server but you would need to enable Dynamic DNS as an advanced option for it to update Bind9 It would need configuring with the details of the Bind9 server And the Bind9 server would have to be configured to allow pfSense to make those updates If you've already done that and it's not working I suggest checking the log files to see where things are going wrong E.g. if Bind9 shows nothing in the logs then something is wrong on the pfSense side as the updates aren't being sent, so check the logs on pfSense One thing I've found with DDNS is updates are usually only sent to the DNS server when a new IP address is being leased. So I've had to clear out existing leases to get things working And on some platforms, they aren't sent for IP addresses that are reserved in DHCP
@@TechTutorialsDavidMcKone Thank you, your walk throughs are really detailed and your explanations make it very easy to understand. I have a question. By default the router acts as the dhcp server right? So did the router assign itself an IP and if so, now that we have set up our own dhcp can we assign the router a different ip than the one it had assigned itself?
Yes, that's right. The router does act as the dhcp server It does not assign itself an IP address using dhcp though. Instead this is a manually configured or static IP address Normally the vendor will let you can change the IP address to whatever you want, but you need to check the IP settings page. Just remember to disable the dhcp server on the router and use the linux server to do dhcp instead. Again, most vendors let you do this I don't recommend using dhcp to assign IP address to critical devices because if the dhcp service stops working, other things break As an example configuration though, let's say the router has now been configured with an IP of 192.168.100.254 I would manually configure the server with an IP of say 192.168.100.10 and configure that dhcp server with a pool ranging from maybe 192.168.100.20 to 192.168.100.250, the subnet mask would be 255.255.255.0 and the default gateway 192.168.100.254 to match the router IP It doesn't have to start at 20 or end at 250 mind. I just prefer to leave a little room either side to manually assign IP addresses to devices And you don't have to use 254 as the gateway, some people use 1
@@TechTutorialsDavidMcKone Thank you David for the detailed explanation. Let me try and see how that goes. Also another question why would a sys admin go through all that hustle when the router can do it all for you? In the production environment that is.
That's a good point, but using a router as a dhcp server isn't practical if you want to scale beyond a simple network and to me it's a bad idea from a security perspective For instance, an ISP router usually isn't clever enough to provide IP addressing for different networks Even in a home network it's better to separate your devices into different network segments, especially to protect against the security risks of IOT/Smart Home devices A firewall is better suited to handling those VLANs, but although the firewall can probably do the dhcp server job, we're at risk of a software vulnerability allowing the firewall to be compromised So ideally, firewalls are best being just firewalls and not running any applications on them Another reason would be in case the router fails. If that happens, not only will you lose your Internet connection, your computers will slowly stop talking to each other as the dhcp server is down Now it's different in a large business environment because you'll have a different teams; one looking after computers such as dhcp servers and another looking after networking devices like routers In small businesses though they do tend to put everything onto one device, like a much more powerful all-in-one computer, but these can cost a lot more money than retail vendors charge for their devices It's not good from a security perspective because of the risk of vulnerabilities, but cost tends to win over security
Sir, i have three server, After Create DNS i want to divert Globally Traffic by Region, Like Asian Visitor divert on asian Server, African Visitor on African Server..... Already i'm Used this Service on Oracle Cloud, it's Very Costlly / Sooooooo i want this Service on my own VPS, will you please tell How do i do this ??
Everything is usually difficult until you eventually get it working And it's a lot to take in and try to understand You have to continue to try until it does work Take a break Then come back and try again
Sir, i have three server, After Create DNS i want to divert Globally Traffic by Region, Like Asian Visitor divert on asian Server, African Visitor on African Server..... Already i'm Used this Service on Oracle Cloud, it's Very Costlly / Sooooooo i want this Service on my own VPS, will you please tell How do i do this ??
The ISC DHCP server has been declared End Of Life so there will be no further updates
Instead use their Kea DHCP server, a video to install and configure the DHCPv4 server can be found here
ua-cam.com/video/FGw06CSLizY/v-deo.html
We're using the ISC DHCP Server for this; It comes with good examples and is easy to install and configure
00:00 Intro
00:35 Planning
04:01 Install & Configure DHCP
22:50 Test DHCP
27:40 DHCP Relay Agent
Can you show me how to configuration dhcpd6.conf
@@jackfrand6951 I'll add this to my to do list but for now I'm not using IPv6
Very detailed explanation and the effort you have put in to make this video is really appreciable.
Glad to hear you found this video useful
Fantastic video with very usefull side explanations about the options that are not being used, gives a clearer image of what i'm configuring. Thanks a lot!
Good to hear you found this useful. I really appreciate feedback to help keep me on track
thank you for lesso teacher
Thanks for the feedback, always appreciated
Hi, if im using internet wifi how do i get the MAC of hardware ethernet (19:19) ?
It depends on the device as to where you should look, but the DHCP server stores the leases in the file /var/lib/dhcp/dhcpd.leases
If you check that it will show you blocks of leases each beginning with the IP address
So check the device to find what it's IP address is then check this file for that IP and the MAC will be in a line below, beginning with hardware ethernet
hello sir, i have a question about what interface did you used for the machine , I saw the interface like ens192 maybe it using nat or bridge or something adapter on virtual machine network configuration, you like install or configuration like 1 interface on your network system . so my second question is . how did you share your network if you used 1 interface . in many tutorials on youtube they'are like using 2 interface for example : 1 interface for sharing dhcp ISP ( internet resource). and the second interface like internal network. thankyou!! i hope you read my comment
and be gratefully if you can answer my question:)
The VM I used was only given one interface
I don't use NATed interfaces, only bridged ones so that each VM has direct network access
As far as I recall, a NATed interface may be a common default option for desktop hypervisors like VirtualBox but not for Enterprise ones like ESXi for instance
But any Ubuntu VM I create on this hypervisor will reference its NIC as ens192
So nothing gets done on my part to influence that naming
I don't see any gain in having multiple network interfaces on a VM like this
That's more for firewalls which have to service different networks directly
An infrastructure server like this requires a production facing interface, which is used to allow DHCP clients to communicate with it and obtain IP addressing
But it can also be used by the server itself to obtain updates from the Internet for instance, etc
That interface would be in a network that is only accessible via a firewall, so any network has the potential to reach it, but only if the firewall allows it
Typically the same firewall would be used to restrict management access as well as production access so there usually isn't any benefit in adding a management NIC to a VM
So the VM will be managed via the same production interface but the hypervisor's own GUI could also be used to provide console access
You such lovely a humble person, Thankyou for the answering and tbh you gonna make me cry haha .. Thankyou. And always keep a good thing. Bless you
Nice and easy, I just wish it had some sort of a web interface.
Would be nice to see the leased IPs without having to ssh into the server and run a command
Yes, it is a lot different if you're used to say a Windows environment with a GUI
As far as I'm aware, there are tools out there that can provide a front end interface for a Linux DHCP server
But I haven't looked into that yet as my focus is on automation through scripting
@@TechTutorialsDavidMcKone You are right, I was using AdGuard as my DNS and DHCP server, however, it has an annoying limitation that its DHCP server always assigns its DNS server to the clients, and you can't even do a secondary server, so if you host machine is down, your internet is basically down.
I install ISC DHCP on BSD Free and Virtual Box machine yesterday thanks to your instructions and it is great, way more control over what I can do, I can even assign different DNS serves to different devices.
I ended up setting Webmin for a web interface and it works great.
Very helpful. Thanks!
Thanks for the feedback and good to know you found this useful
thank you very much. much help found here!
Glad to hear you found this useful and thanks for the feedback, it's much appreciated
Helpme Im try setup ddns (2 weeks) with Pfsense dhcp and bind9 dns (bind9 not updated db) 😢
I don't use pfSense as a DHCP server but you would need to enable Dynamic DNS as an advanced option for it to update Bind9
It would need configuring with the details of the Bind9 server
And the Bind9 server would have to be configured to allow pfSense to make those updates
If you've already done that and it's not working I suggest checking the log files to see where things are going wrong
E.g. if Bind9 shows nothing in the logs then something is wrong on the pfSense side as the updates aren't being sent, so check the logs on pfSense
One thing I've found with DDNS is updates are usually only sent to the DNS server when a new IP address is being leased. So I've had to clear out existing leases to get things working
And on some platforms, they aren't sent for IP addresses that are reserved in DHCP
E:unable to locate package isc-dhcp-server
Can u help me
Thanks for the feedback
Are you using Ubuntu or a different Linux distro?
Have you performed an "apt-get update" first?
I appreciate this walk through a lot but when I ran the status command it failed
Are you using the same Linux OS, Ubuntu 20.04 in my case?
You can get different results depending on the OS used
very nice videos!
Good to know the video was useful
Thank you sir.
Thanks for the feedback, it's really appreciated. And good to hear you found this video useful
@@TechTutorialsDavidMcKone Thank you, your walk throughs are really detailed and your explanations make it very easy to understand. I have a question. By default the router acts as the dhcp server right? So did the router assign itself an IP and if so, now that we have set up our own dhcp can we assign the router a different ip than the one it had assigned itself?
Yes, that's right. The router does act as the dhcp server
It does not assign itself an IP address using dhcp though. Instead this is a manually configured or static IP address
Normally the vendor will let you can change the IP address to whatever you want, but you need to check the IP settings page. Just remember to disable the dhcp server on the router and use the linux server to do dhcp instead. Again, most vendors let you do this
I don't recommend using dhcp to assign IP address to critical devices because if the dhcp service stops working, other things break
As an example configuration though, let's say the router has now been configured with an IP of 192.168.100.254
I would manually configure the server with an IP of say 192.168.100.10 and configure that dhcp server with a pool ranging from maybe 192.168.100.20 to 192.168.100.250, the subnet mask would be 255.255.255.0 and the default gateway 192.168.100.254 to match the router IP
It doesn't have to start at 20 or end at 250 mind. I just prefer to leave a little room either side to manually assign IP addresses to devices
And you don't have to use 254 as the gateway, some people use 1
@@TechTutorialsDavidMcKone Thank you David for the detailed explanation. Let me try and see how that goes. Also another question why would a sys admin go through all that hustle when the router can do it all for you? In the production environment that is.
That's a good point, but using a router as a dhcp server isn't practical if you want to scale beyond a simple network and to me it's a bad idea from a security perspective
For instance, an ISP router usually isn't clever enough to provide IP addressing for different networks
Even in a home network it's better to separate your devices into different network segments, especially to protect against the security risks of IOT/Smart Home devices
A firewall is better suited to handling those VLANs, but although the firewall can probably do the dhcp server job, we're at risk of a software vulnerability allowing the firewall to be compromised
So ideally, firewalls are best being just firewalls and not running any applications on them
Another reason would be in case the router fails. If that happens, not only will you lose your Internet connection, your computers will slowly stop talking to each other as the dhcp server is down
Now it's different in a large business environment because you'll have a different teams; one looking after computers such as dhcp servers and another looking after networking devices like routers
In small businesses though they do tend to put everything onto one device, like a much more powerful all-in-one computer, but these can cost a lot more money than retail vendors charge for their devices
It's not good from a security perspective because of the risk of vulnerabilities, but cost tends to win over security
Sir, i have three server, After Create DNS i want to divert Globally Traffic by Region, Like Asian Visitor divert on asian Server, African Visitor on African Server..... Already i'm Used this Service on Oracle Cloud, it's Very Costlly /
Sooooooo i want this Service on my own VPS, will you please tell How do i do this ??
Maybe others can offer suggestions, but the only method I'm familiar with is services you have to pay for like F5's Big-IP DNS
thank you
Thanks for the feedback. It's good to know you found the video useful
Been at school and watching hundred of video still not working for me...dhcp wont start and fail exam cuz of this :( i must be 100% dumb
Everything is usually difficult until you eventually get it working
And it's a lot to take in and try to understand
You have to continue to try until it does work
Take a break
Then come back and try again
Sir, i have three server, After Create DNS i want to divert Globally Traffic by Region, Like Asian Visitor divert on asian Server, African Visitor on African Server..... Already i'm Used this Service on Oracle Cloud, it's Very Costlly /
Sooooooo i want this Service on my own VPS, will you please tell How do i do this ??
Maybe others can offer suggestions, but the only method I'm familiar with is services you have to pay for like F5's Big-IP DNS