Great explanations here, this would've been useful to watch last week when I finally set DD-WRT aside and decided to create a simple DNS from scratch. You communicated the points very well, and I will definitely share this video with anyone looking to set up dnsmasq
I got lost when you first opened the config file and specified the interface asking myself the question of: how the h do I get to know what my interface is. Now, really, I could lilkely just search the web for that and get even more confused, but frankly, I do like the format of this video even though Im just trying to have dnsmasq store up the DNS locally which it presumably does by default in memory, and while Im not trying to set up a private network, certainly enjoyed the patience you have for explaining this stuff in simple means. Thanks mate
good question. server is correct when configuring dnsmasq. Refer to the man page for more details. Perhaps you’re thinking od using nameserver itself in resolv.conf.
Thanks for the video Kris, most helpful. I am looking for the follow-up video you mentioned regarding Puppet... I can't seem to find it. Is there a link ?
Excellent video! If setting up a machine as a DNS resolver for all devices on a home network, you must also add a firewall rule to allow inbound/outbound tcp/udp traffic through port 53 on that machine, correct?
Thanks! Ultimately, it depends. If iptables is being used on the DNS server, then it may need to be opened up. If the home network is made up of several subnets and access between vlans is controlled via firewall rules on a network device, access would be controlled there. Otherwise, if it’s a flat network, then likely nothing special would be needed.
@@theXchange Ah good point, I just have a simple network with a single subnet managed by a basic home router. Just running dnsmasq and a few other services in an old desktop tower haha. I use iptables via ufw on there, and after allowing port 53 on it and pointing my router towards that machine for DNS, everything is working great. Was even able to setup my OpenVPN server to push the DNS so I can now resolve my hosts when connected remotely. Woohoo! Cheers :)
Excellent walk through. Had issues with windows 10 resolving a 'simplename'. Would work with ipconfig to resolve to FQDN but not ping or using explorer etc. Eventually found you need to disable netbios under the ethernet/wireless adapters IPv4 properties (advanced/WINS settings). After that all is working well - hope this helps someone else.
Hello there, great video, and thank you for sharing the knowledge. But I'm running into some issues. First a quick question, how did you manage to make DNSMasq "realize" 192.168.1.1 is your router? I mean, when I do nslookup, I get no authoritative answer from *127.0.0.1* instead of my Router. I'm going to go with including all my hosts in a separate file, because the last time I messed with etc/hosts, I lost everything from my Raspberry Pi because it could not dig, and not even ping, making it useless for my applications. Speaking of hosts, instead of creating a separate file, I think it's possible to include it in my separate configuration file, which is in /dnsmasq.d I did this: host-record=machine1.home,10.10.0.101 and nslookup managed to find it. The only problem I now have is to make the other computers from my LAN to use DNSMasq (which is set on my Pi) to look up for addresses. What am I missing?
Hey there @rodox2k10. I think I understand the first part of your question, so here's my answer based on my interpretation: On my dnsmasq server, I'm setting a static IP address, and defining the gateway to that of my router, 192.168.1.1. I'm also setting DNS to localhost. That way, I can still route out to the Internet via the gateway, but conduct DNS lookups against itself, and for anything dnsmasq doesn't know about, the request will still get forwarded out to the Internet for resolution (in my example, against the Google DNS servers). Here is what my static IP config looks like: 3031 vmwdnsmasq ~ # cat /etc/sysconfig/network-scripts/ifcfg-ens160 # File Managed by Puppet DEVICE="ens160" BOOTPROTO="static" ONBOOT="yes" TYPE="Ethernet" USERCTL="no" PEERDNS="no" PEERNTP="no" IPADDR="192.168.1.3" NETMASK="255.255.255.0" GATEWAY="192.168.1.1" DEFROUTE="yes" DNS1="127.0.0.1" This config results in a resolv.conf as follows: 3031 vmwdnsmasq ~ # cat /etc/resolv.conf # Generated by NetworkManager search 3031.net nameserver 127.0.0.1 Looking up something on the Internet: --- 3031 vmwdnsmasq ~ # nslookup kb.kristianreese.com Server: 127.0.0.1 Address: 127.0.0.1#53 Non-authoritative answer: Name: kb.kristianreese.com Address: 206.188.206.106 --- versus looking up something contained within my dnsmasq configuration: --- 3031 vmwdnsmasq ~ # nslookup vmwdnsmasq Server: 127.0.0.1 Address: 127.0.0.1#53 Name: vmwdnsmasq.3031.net Address: 192.168.1.3 --- Both go to localhost, but the lookup is either returned from Google DNS (The Non-authoritative answer against kb.kristianreese.com) or returned from dnsmasq (the 2nd example). -- As far as tying in your other computers to resolve against your Pi dnsmasq instance, you have a couple of options. First, take a look at my article discussion those options: kb.kristianreese.com/index.php?View=entry&EntryID=171 The approach I took was to change my routers configuration to specify which DNS servers it should use. I set the Primary DNS to that of my vmwdnsmasq server (192.168.1.3) and left the secondary blank. Now I understand I have a single point of failure here, but it's a risk I accept as low provided how stable this configuration has been for MY environment (I discuss in more detail at the above link). Feel free to reach out with any further questions, whether that's here or through the "Ask a Question" link from my website. I'm happy to talk more on this and help out in any way I can! Good luck! Kris
At that point, I don’t know that I would set the IP of the dnsmasq server to be handed out via DHCP from the router. Depending on your setup, if the devices you wish to communicate with your .home devices are assigned static IP addresses, statically set DNS on those hosts to your dnsmasq server. For names not resolvable by the dnsmasq server, configure dnsmasq to forward the lookup to your preferred resolver on the Internet.
@@DanteBarba gotchya. That makes sense. At that point, if your DHCP provider (the router) sets multiple nameservers up on your clients, then resolution to any non .home domains should resolve to one of the surviving nameservers whenever dnsmasq is unavilable. The problem with that, however, is that when the dnsmasq service is restored, your clients likely will not recognize it's available (as it's not running a continual check) and thus may not "failback" to use it as the primary without restarting the network service. You'd have to test the behavior of this to know for sure, but I seem to remember this being the case when I tested for that scenario.
hello thanks for this great video i have a question " i m trying to make captive portal dns server .i use dnsmasq to set up the dns in the config file use : server= < CPD URLs / ipaddr > CPD is captive portal detection urls like : captive.apple.com/hotspot-detect.html 2connectivitycheck.gstatic.com/generate_204 2connectivitycheck.platform.hicloud.com/generate_204 2 the "sing in to the network" sucsessfully pop up in the connected device is there any option to unreddirect those CPD urls after 3 seconds with dnsmasq so that the notification disapear after 3 seconds "
I have no direct experience in setting up a captive portal. I did a little digging to see if I could better understand, and came across this but not sure it addresses your question. medium.com/@rachitpandya93/how-to-create-a-captive-portal-38aba6284b91 Anyway, could anything be done via javascript on the client side?
@@theXchange yes bro the senario is like when a client connect to the network a page will pop up then after he press connect the page will disappear . so mainly i need to redirect requested urls to the page then unredirect them so does dnsmasq support redirection just for a duration if not does ip tables can help iptables block the device from accessing port 443 and when the page pop up a request to the server will unblock device from accesing port 443 sorry for any linguistic mistake
So dnsmasq, from what I know, isn’t capable of redirecting traffic per se, at least in the manner you’re talking about. I’d think that would be up to the web application handling the serving up of the content, including the landing page. I wish I could help with more specifics, but I’ve never set up anything like that before so I’m simply unfamiliar. Best of luck!!
Thank you for the great video! Can you show an example of configuring a separate host to use dnsmasq server to resolve dns queries? I'm only able to find example where people configure the server, but never show an example of using a client on a separate host.
I touch on how to configure the client in the video (towards the end of the video, I speak about it, but don't' show it if I remember correctly?). Basically, if your router is configurable to set the desired DNS resolver for your DHCP clients, then that would be one way, and is precisely how I did mine. This would cover ANY client from which your router assigns an IP address, which in my home is a myriad of devices (Rasberry Pi, tablets, cell phones, IoT devices, Linux and Windows systems, etc). Otherwise, if your setting static IP addresses and only desire to have certain devices set to the dnsmasq server, then the appropriate configuration can be made on that device. For instance, on a CentOS Linux host, setting the interface configuration within /etc/sysconfig/network-scripts/ifcfg- would set the appropriate resolver for /etc/resolv.conf. Windows would be however it's done in Windows via right clicking on the device and setting the IPv4 settings for it. Let me know if this doesn't quite answer your question!
one question, what if I want to do the nslookup but without putting localhost in the end. I am installing a software and it fails during nslookup because the software does not do the nslookup with localhost. So changing the software is not an option. Can we remove the localhost and still get the nslookup working? Any configuration change? Please suggest.
1. If you're installing the software on the same host as your dnsmasq installation, then simply update /etc/resolv.conf to point at localhost. 2. If you're installing the software on a host separate from the dnsmasq server, then update that systems /etc/resolv.conf to point at the IP address of your dnsmasq server (this of course assumes the application is being installed on a Linux host) Hope that helps!
Hey. No, I do not think this is possible with dnsmasq. If you’re wanting each to point to the same IP, maybe a CNAME would do? Depends on what you’re looking to accomplish.
Great Explanation. In my case I used resolv.conf and nslookup resolves all the IP's in my hosts file successfully. However I cannot ping any of them. Is that normal or is something wrong. Ping comes back as host unreachable. This is in my Linux 7.5 VM using virtualbox.
The answer is, "it depends". :) Are you attempting to ping other VMs running within virtualbox, or outside of virtualbox? You might need to check your NIC settings on your dnsmasq host to verify they are correct for however you're attempting to communicate with those other hosts.
Sorry I actually I meant to say I cannot ping any of my Virtual IP's which I set up in the /etc/hosts file. I can ping my other VM's as well as host machine within the virtual box . I need those VIP's for Oracle RAC database setup. In the /etc/resolve.conf nameserver pointing to IP of the VM. I think I found the answer in some other blog that says we cannot ping VIP's because there are no network adapter associated with those . Thanks.
I implemented this on my QNAP nas, seems to work ok when I do the nslookups on the nas itself. Not quite sure which no-dhcp-interface to set though (br0 or eth0). And also not sure what ip address for dns to set in my router so it uses dnsmasq installed on the QNAP NAS instead of the default provider's dns servers. Should this be the static IP of my router where dnsmasq is installed on (this doesn't seem to work if I set this on the router: no more internet connection).
one thing you can do test is perform a lookup from your laptop against your qnap. For example, let’s say you setup dnsmasq on the qnap for the very first time. You ran a test on the qnap and as you said, that seems to work fine. Let’s say the ip address of your qnap is 192.168.1.5. From your laptop, open a terminal (or command prompt) and type “nslookup google.com 196.168.1.5”. If an ip address is returned, it would seem you’re dnsmasq installation and configuration is correct. Now, if you’re router is handing out dhcp to your laptop, see if you can control the dns resolvers handed out by dhcp. If that can be modified, make the update and renew your dchp to update your laptops resolv.conf. As far as changing the resolver ips on the modem itself, that may or may not be allowed bu your ISP. But, this setup should be enough to bypass use of the isp resolvers provided your dnsmasq is forwarding requests to something else. Hope that helps!
@@theXchange I tried the nslookup on another machine, but didn't get any response. Unfortunately, after a reboot of the QNAP nas, all the configuration was gone. Seems QNAP doens't pertain changes within /etc after a reboot. Now trying to use pi-hole together with dnsmasq in a docker container on the QNAP. Turned off DHCP on the router and turned it on in pi-hole. That seems to work fine: computers on the network now seem to get an ip address from the DHCP server from pi-hole. Now only need to figure out how to setup dnsmasq within pi-hole: I believe I need to configure that within the volume that was created by the pi-hole docker yml file instead of doing that on the real host within /etc
friend , i have installed my router and set DNS server ip address of my vm ip address where i setup dnsmasq system. is it necessary to add dhcp configuration for my all local network ? second can set all domain name in in /etc/hosts config file like google, yahoo or in 3032.net domain file . thank you in advance
Hey -- If I'm understanding the question correctly, you don't have to use DHCP for all of your local network machines. You could set some statically, and others via DHCP. What matters is that the local /etc/hosts file on the dnsmasq server has the right hostname to IP address mappings for your local network machines. The trick in with machines whose IPs are acquired via DHCP are properly updated in /etc/hosts on the dnsmasq server, something I spoke of in the video. In particular, using something like Puppet to manage that aspect of the config for you automatically keeps your configs in sync for any machine whose IP address may change in DHCP. (I have yet to publish the follow up on this video with using Puppet).
Great explanations here, this would've been useful to watch last week when I finally set DD-WRT aside and decided to create a simple DNS from scratch. You communicated the points very well, and I will definitely share this video with anyone looking to set up dnsmasq
+comptv Thank you! I appreciate the comment.
I got lost when you first opened the config file and specified the interface asking myself the question of: how the h do I get to know what my interface is.
Now, really, I could lilkely just search the web for that and get even more confused, but frankly, I do like the format of this video even though Im just trying to have dnsmasq store up the DNS locally which it presumably does by default in memory, and while Im not trying to set up a private network, certainly enjoyed the patience you have for explaining this stuff in simple means. Thanks mate
Guess I took some things for granted :). I’m glad you enjoyed the video!
@@theXchange
Its alright, definitely better than not being able to understand anything regarding dnsmasq
Outstanding video, helped me out no end. Managed to get dns setup just as you demonstrated here. Thank you so much for takeing the time to post this.
Awesome. I’m glad it was helpful!
Should you not use nameserver instead of server ?
good question. server is correct when configuring dnsmasq. Refer to the man page for more details. Perhaps you’re thinking od using nameserver itself in resolv.conf.
I haven't implemented this, yet, but I can tell that great care was taken to be clear and concise. Thanks for a great instructional video on dnsmasq!
As an update, I just got dnsmasq working, per this video. Another satisfied customer, Kris. :)
That’s awesome! I’m glad the video was useful!
only watched up to 8:38 and everything works as I want now. thanks! :-)
Fantastic video, great explanations.
Thanks for the video Kris, most helpful. I am looking for the follow-up video you mentioned regarding Puppet... I can't seem to find it. Is there a link ?
I never made the video with Puppet, but I did write about it here: kristianreese.com/2019/05/06/Home-Lab-DNS-Using-dnsmasq-and-Puppet/
Thank you So much Kris!. Indeed a beautifully explained Tutorial. God bless you kind sir!
Thank you! I appreciate the comment.
Very nice and simple. would you chose this one over bind9??
it’s been a while since I’ve messed with bind, so I can’t honestly say.
Great explanation! Thank you very much
Excellent video! If setting up a machine as a DNS resolver for all devices on a home network, you must also add a firewall rule to allow inbound/outbound tcp/udp traffic through port 53 on that machine, correct?
Thanks! Ultimately, it depends. If iptables is being used on the DNS server, then it may need to be opened up. If the home network is made up of several subnets and access between vlans is controlled via firewall rules on a network device, access would be controlled there. Otherwise, if it’s a flat network, then likely nothing special would be needed.
@@theXchange Ah good point, I just have a simple network with a single subnet managed by a basic home router. Just running dnsmasq and a few other services in an old desktop tower haha. I use iptables via ufw on there, and after allowing port 53 on it and pointing my router towards that machine for DNS, everything is working great. Was even able to setup my OpenVPN server to push the DNS so I can now resolve my hosts when connected remotely. Woohoo! Cheers :)
Excellent walk through.
Had issues with windows 10 resolving a 'simplename'. Would work with ipconfig to resolve to FQDN but not ping or using explorer etc. Eventually found you need to disable netbios under the ethernet/wireless adapters IPv4 properties (advanced/WINS settings). After that all is working well - hope this helps someone else.
That was an excellent guide! Thanks!
Glad to help!!
Great Job Kris, good explanation step by step
Thank you!
Warm welcome.
Very nice explanation, simple and clear! Thank you!
thanks! worked for me on Ubunu
great!
Nice video bro!!! Really helped
Awesome! Thank you! 🙏
Thank you for the amazing content, How can we learn more about how to set up all these configurations regarding dnsmasq?
www.thekelleys.org.uk/dnsmasq/doc.html
Thank you for a great video sir.
you’re welcome
Hello there, great video, and thank you for sharing the knowledge.
But I'm running into some issues. First a quick question, how did you manage to make DNSMasq "realize" 192.168.1.1 is your router? I mean, when I do nslookup, I get no authoritative answer from *127.0.0.1* instead of my Router. I'm going to go with including all my hosts in a separate file, because the last time I messed with etc/hosts, I lost everything from my Raspberry Pi because it could not dig, and not even ping, making it useless for my applications.
Speaking of hosts, instead of creating a separate file, I think it's possible to include it in my separate configuration file, which is in /dnsmasq.d I did this:
host-record=machine1.home,10.10.0.101 and nslookup managed to find it.
The only problem I now have is to make the other computers from
my LAN to use DNSMasq (which is set on my Pi) to look up for
addresses. What am I missing?
Hey there @rodox2k10. I think I understand the first part of your question, so here's my answer based on my interpretation:
On my dnsmasq server, I'm setting a static IP address, and defining the gateway to that of my router, 192.168.1.1. I'm also setting DNS to localhost. That way, I can still route out to the Internet via the gateway, but conduct DNS lookups against itself, and for anything dnsmasq doesn't know about, the request will still get forwarded out to the Internet for resolution (in my example, against the Google DNS servers).
Here is what my static IP config looks like:
3031 vmwdnsmasq ~ # cat /etc/sysconfig/network-scripts/ifcfg-ens160
# File Managed by Puppet
DEVICE="ens160"
BOOTPROTO="static"
ONBOOT="yes"
TYPE="Ethernet"
USERCTL="no"
PEERDNS="no"
PEERNTP="no"
IPADDR="192.168.1.3"
NETMASK="255.255.255.0"
GATEWAY="192.168.1.1"
DEFROUTE="yes"
DNS1="127.0.0.1"
This config results in a resolv.conf as follows:
3031 vmwdnsmasq ~ # cat /etc/resolv.conf
# Generated by NetworkManager
search 3031.net
nameserver 127.0.0.1
Looking up something on the Internet:
---
3031 vmwdnsmasq ~ # nslookup kb.kristianreese.com
Server: 127.0.0.1
Address: 127.0.0.1#53
Non-authoritative answer:
Name: kb.kristianreese.com
Address: 206.188.206.106
---
versus looking up something contained within my dnsmasq configuration:
---
3031 vmwdnsmasq ~ # nslookup vmwdnsmasq
Server: 127.0.0.1
Address: 127.0.0.1#53
Name: vmwdnsmasq.3031.net
Address: 192.168.1.3
---
Both go to localhost, but the lookup is either returned from Google DNS (The Non-authoritative answer against kb.kristianreese.com) or returned from dnsmasq (the 2nd example).
--
As far as tying in your other computers to resolve against your Pi dnsmasq instance, you have a couple of options. First, take a look at my article discussion those options:
kb.kristianreese.com/index.php?View=entry&EntryID=171
The approach I took was to change my routers configuration to specify which DNS servers it should use. I set the Primary DNS to that of my vmwdnsmasq server (192.168.1.3) and left the secondary blank. Now I understand I have a single point of failure here, but it's a risk I accept as low provided how stable this configuration has been for MY environment (I discuss in more detail at the above link). Feel free to reach out with any further questions, whether that's here or through the "Ask a Question" link from my website. I'm happy to talk more on this and help out in any way I can!
Good luck!
Kris
At that point, I don’t know that I would set the IP of the dnsmasq server to be handed out via DHCP from the router. Depending on your setup, if the devices you wish to communicate with your .home devices are assigned static IP addresses, statically set DNS on those hosts to your dnsmasq server. For names not resolvable by the dnsmasq server, configure dnsmasq to forward the lookup to your preferred resolver on the Internet.
@@DanteBarba gotchya. That makes sense. At that point, if your DHCP provider (the router) sets multiple nameservers up on your clients, then resolution to any non .home domains should resolve to one of the surviving nameservers whenever dnsmasq is unavilable. The problem with that, however, is that when the dnsmasq service is restored, your clients likely will not recognize it's available (as it's not running a continual check) and thus may not "failback" to use it as the primary without restarting the network service. You'd have to test the behavior of this to know for sure, but I seem to remember this being the case when I tested for that scenario.
Thanks, this was really useful, it'd be great to see a tutorial on DHCP usage as well.
Good idea. If I can find the time, I’ll see about doing that! It would be cool to turn off DHCP at the router level.
Thanks for the video.. Got the exact solution for what I was searching for.. Good Explanation as well..
Awesome! Thanks!
hello thanks for this great video
i have a question "
i m trying to make captive portal dns server .i use dnsmasq to set up the dns in the config file use : server= < CPD URLs / ipaddr >
CPD is captive portal detection urls like :
captive.apple.com/hotspot-detect.html 2connectivitycheck.gstatic.com/generate_204 2connectivitycheck.platform.hicloud.com/generate_204 2
the "sing in to the network" sucsessfully pop up in the connected device
is there any option to unreddirect those CPD urls after 3 seconds with dnsmasq so that the notification disapear after 3 seconds
"
I have no direct experience in setting up a captive portal. I did a little digging to see if I could better understand, and came across this but not sure it addresses your question. medium.com/@rachitpandya93/how-to-create-a-captive-portal-38aba6284b91
Anyway, could anything be done via javascript on the client side?
@@theXchange yes bro
the senario is like when a client connect to the network a page will pop up then after he press connect the page will disappear .
so mainly i need to redirect requested urls to the page then unredirect them so does dnsmasq support redirection just for a duration if not
does ip tables can help
iptables block the device from accessing port 443 and when the page pop up a request to the server will unblock device from accesing port 443
sorry for any linguistic mistake
So dnsmasq, from what I know, isn’t capable of redirecting traffic per se, at least in the manner you’re talking about. I’d think that would be up to the web application handling the serving up of the content, including the landing page. I wish I could help with more specifics, but I’ve never set up anything like that before so I’m simply unfamiliar. Best of luck!!
@@theXchange thank you bro
Very informative video.
Thanks!!
I’ll sub to your channel to watch some of your videos. Looks like some good content!
@@theXchange I appreciate it.
Thank you for the great video! Can you show an example of configuring a separate host to use dnsmasq server to resolve dns queries? I'm only able to find example where people configure the server, but never show an example of using a client on a separate host.
I touch on how to configure the client in the video (towards the end of the video, I speak about it, but don't' show it if I remember correctly?). Basically, if your router is configurable to set the desired DNS resolver for your DHCP clients, then that would be one way, and is precisely how I did mine. This would cover ANY client from which your router assigns an IP address, which in my home is a myriad of devices (Rasberry Pi, tablets, cell phones, IoT devices, Linux and Windows systems, etc). Otherwise, if your setting static IP addresses and only desire to have certain devices set to the dnsmasq server, then the appropriate configuration can be made on that device. For instance, on a CentOS Linux host, setting the interface configuration within /etc/sysconfig/network-scripts/ifcfg- would set the appropriate resolver for /etc/resolv.conf. Windows would be however it's done in Windows via right clicking on the device and setting the IPv4 settings for it. Let me know if this doesn't quite answer your question!
systemctl start dnsmasq fails for me, when I run "systemctl status dnsmasq.service " I get :
"bad option at line 4 of /etc/dnsmasq.d/3031.net"
what’s the content of the file?
@@theXchange it's exactly the content of your file, just the first line I've put enp7s0 instead.
you link is not working
Thank you. I will fix it. Here’s the link: kristianreese.com/2019/05/06/Home-Lab-DNS-Using-dnsmasq-and-Puppet/
one question, what if I want to do the nslookup but without putting localhost in the end. I am installing a software and it fails during nslookup because the software does not do the nslookup with localhost. So changing the software is not an option. Can we remove the localhost and still get the nslookup working? Any configuration change? Please suggest.
1. If you're installing the software on the same host as your dnsmasq installation, then simply update /etc/resolv.conf to point at localhost.
2. If you're installing the software on a host separate from the dnsmasq server, then update that systems /etc/resolv.conf to point at the IP address of your dnsmasq server (this of course assumes the application is being installed on a Linux host) Hope that helps!
@@theXchange Thanks for the help. It fixed my issue (added 127.0.0.1 into resolv.conf).. million thanks
Hey Kris,
Can dnsmasq redirect a fqdn? For example simplename.3031.net to complexname.3031.net.
Hey. No, I do not think this is possible with dnsmasq. If you’re wanting each to point to the same IP, maybe a CNAME would do? Depends on what you’re looking to accomplish.
Thanks, Kris!
I will look for some other way.
Should you find a solution, I wouldn’t mind hearing what you come up with.
Sure, I will update here whatever I come up with.
Great Explanation. In my case I used resolv.conf and nslookup resolves all the IP's in my hosts file successfully. However I cannot ping any of them. Is that normal or is something wrong. Ping comes back as host unreachable. This is in my Linux 7.5 VM using virtualbox.
The answer is, "it depends". :) Are you attempting to ping other VMs running within virtualbox, or outside of virtualbox? You might need to check your NIC settings on your dnsmasq host to verify they are correct for however you're attempting to communicate with those other hosts.
Sorry I actually I meant to say I cannot ping any of my Virtual IP's which I set up in the /etc/hosts file. I can ping my other VM's as well as host machine within the virtual box . I need those VIP's for Oracle RAC database setup. In the /etc/resolve.conf nameserver pointing to IP of the VM. I think I found the answer in some other blog that says we cannot ping VIP's because there are no network adapter associated with those . Thanks.
I implemented this on my QNAP nas, seems to work ok when I do the nslookups on the nas itself. Not quite sure which no-dhcp-interface to set though (br0 or eth0). And also not sure what ip address for dns to set in my router so it uses dnsmasq installed on the QNAP NAS instead of the default provider's dns servers. Should this be the static IP of my router where dnsmasq is installed on (this doesn't seem to work if I set this on the router: no more internet connection).
one thing you can do test is perform a lookup from your laptop against your qnap. For example, let’s say you setup dnsmasq on the qnap for the very first time. You ran a test on the qnap and as you said, that seems to work fine. Let’s say the ip address of your qnap is 192.168.1.5. From your laptop, open a terminal (or command prompt) and type “nslookup google.com 196.168.1.5”. If an ip address is returned, it would seem you’re dnsmasq installation and configuration is correct. Now, if you’re router is handing out dhcp to your laptop, see if you can control the dns resolvers handed out by dhcp. If that can be modified, make the update and renew your dchp to update your laptops resolv.conf. As far as changing the resolver ips on the modem itself, that may or may not be allowed bu your ISP. But, this setup should be enough to bypass use of the isp resolvers provided your dnsmasq is forwarding requests to something else. Hope that helps!
@@theXchange I tried the nslookup on another machine, but didn't get any response. Unfortunately, after a reboot of the QNAP nas, all the configuration was gone. Seems QNAP doens't pertain changes within /etc after a reboot.
Now trying to use pi-hole together with dnsmasq in a docker container on the QNAP. Turned off DHCP on the router and turned it on in pi-hole. That seems to work fine: computers on the network now seem to get an ip address from the DHCP server from pi-hole. Now only need to figure out how to setup dnsmasq within pi-hole: I believe I need to configure that within the volume that was created by the pi-hole docker yml file instead of doing that on the real host within /etc
friend , i have installed my router and set DNS server ip address of my vm ip address where i setup dnsmasq system. is it necessary to add dhcp configuration for my all local network ? second can set all domain name in in /etc/hosts config file like google, yahoo or in 3032.net domain file . thank you in advance
Hey -- If I'm understanding the question correctly, you don't have to use DHCP for all of your local network machines. You could set some statically, and others via DHCP. What matters is that the local /etc/hosts file on the dnsmasq server has the right hostname to IP address mappings for your local network machines. The trick in with machines whose IPs are acquired via DHCP are properly updated in /etc/hosts on the dnsmasq server, something I spoke of in the video. In particular, using something like Puppet to manage that aspect of the config for you automatically keeps your configs in sync for any machine whose IP address may change in DHCP. (I have yet to publish the follow up on this video with using Puppet).
How then do we set this up *IF* your gateway device is your dnsmasq server? Anyone?
I assume your gateway device’s dnsmasq service is configurable? If so, you should be able to set it up as described but directly on your device.
Man this drained my Poco F3 for 4 hours. Well I was watching videos too. Not the video I wanted but looks like this app can't be turned off it seems.