<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	
	>
<channel>
	<title>
	Comments on: How to Setup a DNS/DHCP Server Using dnsmasq on CentOS/RHEL 8/7	</title>
	<atom:link href="https://www.tecmint.com/setup-a-dns-dhcp-server-using-dnsmasq-on-centos-rhel/feed/" rel="self" type="application/rss+xml" />
	<link>https://www.tecmint.com/setup-a-dns-dhcp-server-using-dnsmasq-on-centos-rhel/</link>
	<description>Tecmint - Linux Howtos, Tutorials, Guides, News, Tips and Tricks.</description>
	<lastBuildDate>Mon, 13 Feb 2023 10:30:51 +0000</lastBuildDate>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	
	<item>
		<title>
		By: Sweptnumbernumbernumber		</title>
		<link>https://www.tecmint.com/setup-a-dns-dhcp-server-using-dnsmasq-on-centos-rhel/comment-page-1/#comment-1963307</link>

		<dc:creator><![CDATA[Sweptnumbernumbernumber]]></dc:creator>
		<pubDate>Mon, 13 Feb 2023 10:30:51 +0000</pubDate>
		<guid isPermaLink="false">https://www.tecmint.com/?p=34818#comment-1963307</guid>

					<description><![CDATA[I think you did wrong with the &lt;strong&gt;resolv.conf&lt;/strong&gt; permission part. It&#039;s been overwritten from time to time due to another daemon controlling it. 

It&#039;s a link in the place. So instead of making it readonly, you shall do this:
&lt;pre&gt;
# ls -lh /etc/resolv.conf

lrwxrwxrwx 1 root root /etc/resolv.conf -&#062; ../run/resolvconf/resolv.conf
&lt;/pre&gt;
Stop the systemd dns daemon running on port 53
&lt;pre&gt;
$ sudo systemctl disable systemd-resolved
$ sudo systemctl stop systemd-resolved
&lt;/pre&gt;
Replace it with dnsmasq running on port 53.
&lt;pre&gt;
$ sudo apt update
$ sudo apt purge dns-root-data -y
$ sudo apt install dnsmasq --no-install-recommends -y
&lt;/pre&gt;
Take back control of &lt;strong&gt;/etc/resolv.conf&lt;/strong&gt; from &lt;strong&gt;//&lt;/strong&gt;.
&lt;pre&gt;
$ sudo unlink /etc/resolv.conf
&lt;/pre&gt;
Unlink to get back control of the &lt;strong&gt;resolv.conf&lt;/strong&gt; from &lt;strong&gt;&#039;&#039;&lt;/strong&gt;, then overwrite.
&lt;pre&gt;
$ echo &#039;nameserver 127.0.0.1&#039; &#124; sudo tee /etc/resolv.conf
$ echo &#039;search localdomain&#039; &#124; sudo tee -a /etc/resolv.conf
&lt;/pre&gt;
How is the flow work:

System → resolv.conf (been controlled by other daemons **if not unlink**).
dnsmasq → hard-coded results /odoo.com/127.0.0.1 with wildcard match,**break;**
/etc/hosts with an exact match, &lt;strong&gt;**break;**&lt;/strong&gt;
upstream DNS server, **break or timeout then continue
Other ns in resolv.conf if dnsmasq timeout, which would be several seconds. 

Might need to edit`&lt;strong&gt;/etc/network/interfaces&lt;/strong&gt; for persistent configuration, or the file `&lt;strong&gt;/etc/netplan/&lt;/strong&gt;` on Ubuntu servers.]]></description>
			<content:encoded><![CDATA[<p>I think you did wrong with the <strong>resolv.conf</strong> permission part. It&#8217;s been overwritten from time to time due to another daemon controlling it. </p>
<p>It&#8217;s a link in the place. So instead of making it readonly, you shall do this:</p>
<pre>
# ls -lh /etc/resolv.conf

lrwxrwxrwx 1 root root /etc/resolv.conf -&gt; ../run/resolvconf/resolv.conf
</pre>
<p>Stop the systemd dns daemon running on port 53</p>
<pre>
$ sudo systemctl disable systemd-resolved
$ sudo systemctl stop systemd-resolved
</pre>
<p>Replace it with dnsmasq running on port 53.</p>
<pre>
$ sudo apt update
$ sudo apt purge dns-root-data -y
$ sudo apt install dnsmasq --no-install-recommends -y
</pre>
<p>Take back control of <strong>/etc/resolv.conf</strong> from <strong>//</strong>.</p>
<pre>
$ sudo unlink /etc/resolv.conf
</pre>
<p>Unlink to get back control of the <strong>resolv.conf</strong> from <strong>&#8221;</strong>, then overwrite.</p>
<pre>
$ echo 'nameserver 127.0.0.1' | sudo tee /etc/resolv.conf
$ echo 'search localdomain' | sudo tee -a /etc/resolv.conf
</pre>
<p>How is the flow work:</p>
<p>System → resolv.conf (been controlled by other daemons **if not unlink**).<br />
dnsmasq → hard-coded results /odoo.com/127.0.0.1 with wildcard match,**break;**<br />
/etc/hosts with an exact match, <strong>**break;**</strong><br />
upstream DNS server, **break or timeout then continue<br />
Other ns in resolv.conf if dnsmasq timeout, which would be several seconds. </p>
<p>Might need to edit`<strong>/etc/network/interfaces</strong> for persistent configuration, or the file `<strong>/etc/netplan/</strong>` on Ubuntu servers.</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: David Woodthorpe		</title>
		<link>https://www.tecmint.com/setup-a-dns-dhcp-server-using-dnsmasq-on-centos-rhel/comment-page-1/#comment-1558833</link>

		<dc:creator><![CDATA[David Woodthorpe]]></dc:creator>
		<pubDate>Sun, 01 Aug 2021 12:48:33 +0000</pubDate>
		<guid isPermaLink="false">https://www.tecmint.com/?p=34818#comment-1558833</guid>

					<description><![CDATA[In reply to &lt;a href=&quot;https://www.tecmint.com/setup-a-dns-dhcp-server-using-dnsmasq-on-centos-rhel/comment-page-1/#comment-1401270&quot;&gt;Elijah&lt;/a&gt;.

I would think you would have to configure your iPhone&#039;s network settings to use the local DNS server.]]></description>
			<content:encoded><![CDATA[<p>In reply to <a target="_blank" href="https://www.tecmint.com/setup-a-dns-dhcp-server-using-dnsmasq-on-centos-rhel/comment-page-1/#comment-1401270">Elijah</a>.</p>
<p>I would think you would have to configure your iPhone&#8217;s network settings to use the local DNS server.</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: sachin		</title>
		<link>https://www.tecmint.com/setup-a-dns-dhcp-server-using-dnsmasq-on-centos-rhel/comment-page-1/#comment-1516821</link>

		<dc:creator><![CDATA[sachin]]></dc:creator>
		<pubDate>Sun, 06 Jun 2021 21:04:19 +0000</pubDate>
		<guid isPermaLink="false">https://www.tecmint.com/?p=34818#comment-1516821</guid>

					<description><![CDATA[Very helpful article, thank you sir!]]></description>
			<content:encoded><![CDATA[<p>Very helpful article, thank you sir!</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: SilentOne		</title>
		<link>https://www.tecmint.com/setup-a-dns-dhcp-server-using-dnsmasq-on-centos-rhel/comment-page-1/#comment-1491114</link>

		<dc:creator><![CDATA[SilentOne]]></dc:creator>
		<pubDate>Sat, 15 May 2021 12:47:17 +0000</pubDate>
		<guid isPermaLink="false">https://www.tecmint.com/?p=34818#comment-1491114</guid>

					<description><![CDATA[In reply to &lt;a href=&quot;https://www.tecmint.com/setup-a-dns-dhcp-server-using-dnsmasq-on-centos-rhel/comment-page-1/#comment-1361371&quot;&gt;moein&lt;/a&gt;.

DNS resolves hostnames to IP&#039;s or the other way around it has nothing to do with URI&#039;s i.e &lt;strong&gt;address=/example1.com/127.0.0.1&lt;/strong&gt; resolves &lt;strong&gt;example1.com&lt;/strong&gt; to ip address 127.0.0.1 nothing more.

If you want some kind of redirect to configure it inside of your web server DNS can&#039;t do this]]></description>
			<content:encoded><![CDATA[<p>In reply to <a target="_blank" href="https://www.tecmint.com/setup-a-dns-dhcp-server-using-dnsmasq-on-centos-rhel/comment-page-1/#comment-1361371">moein</a>.</p>
<p>DNS resolves hostnames to IP&#8217;s or the other way around it has nothing to do with URI&#8217;s i.e <strong>address=/example1.com/127.0.0.1</strong> resolves <strong>example1.com</strong> to ip address 127.0.0.1 nothing more.</p>
<p>If you want some kind of redirect to configure it inside of your web server DNS can&#8217;t do this</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Gineesh		</title>
		<link>https://www.tecmint.com/setup-a-dns-dhcp-server-using-dnsmasq-on-centos-rhel/comment-page-1/#comment-1480609</link>

		<dc:creator><![CDATA[Gineesh]]></dc:creator>
		<pubDate>Sat, 24 Apr 2021 05:33:56 +0000</pubDate>
		<guid isPermaLink="false">https://www.tecmint.com/?p=34818#comment-1480609</guid>

					<description><![CDATA[Why PTR Record is not working?

any idea?

Also, how to add a default search domain on dnsmasq?]]></description>
			<content:encoded><![CDATA[<p>Why PTR Record is not working?</p>
<p>any idea?</p>
<p>Also, how to add a default search domain on dnsmasq?</p>
]]></content:encoded>
		
			</item>
	</channel>
</rss>
