<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	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/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>DNS &#8211; Roumazeilles.net</title>
	<atom:link href="https://www.roumazeilles.net/news/en/wordpress/tag/dns/feed/" rel="self" type="application/rss+xml" />
	<link>https://www.roumazeilles.net/news/en/wordpress</link>
	<description>Technology opinions and others</description>
	<lastBuildDate>Sun, 22 Nov 2020 18:40:07 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	
	<item>
		<title>Raspberry Pi as a local DNS/DHCP server</title>
		<link>https://www.roumazeilles.net/news/en/wordpress/2020/11/23/raspberry-pi-as-a-local-dns-dhcp-server/</link>
					<comments>https://www.roumazeilles.net/news/en/wordpress/2020/11/23/raspberry-pi-as-a-local-dns-dhcp-server/#respond</comments>
		
		<dc:creator><![CDATA[Yves Roumazeilles]]></dc:creator>
		<pubDate>Mon, 23 Nov 2020 19:21:56 +0000</pubDate>
				<category><![CDATA[IPv6]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Routers & networks]]></category>
		<category><![CDATA[DHCP]]></category>
		<category><![CDATA[DNS]]></category>
		<category><![CDATA[dnsmasq]]></category>
		<category><![CDATA[filter]]></category>
		<category><![CDATA[IPv4]]></category>
		<category><![CDATA[proxy]]></category>
		<category><![CDATA[Raspberry Pi]]></category>
		<guid isPermaLink="false">https://www.roumazeilles.net/news/en/wordpress/?p=15038</guid>

					<description><![CDATA[For a local network supporting a small company or an Internet-active family, it is always possible to rely totally on an Internet Service Provider (ISP) which will provide basic network services straight from the Internet box/router (fibre or ADSL). But, if &#8211; like me &#8211; you want to have more flexibility, you&#8217;d prefer to setup [&#8230;]]]></description>
										<content:encoded><![CDATA[
<p>For a local network supporting a small company or an Internet-active family, it is always possible to rely totally on an Internet Service Provider (ISP) which will provide basic network services straight from the Internet box/router (fibre or ADSL). But, if &#8211; like me &#8211; you want to have more flexibility, you&#8217;d prefer to setup your own services.</p>



<p>I noticed the market emergence of nano-computers like Android boxes or Raspberry Pi which allow to easily setup services that may have been prohibitely expensive in the past.</p>



<p>So, I decided to pruchase a Raspberry Pi 3 B+ (a rather cheap network little box, with low power consumption, able to stay online permanently, and easily configurable). I wanted to start by deploying the minimal network services to give me maximum agency.</p>



<p>Minimum feature set included:</p>



<ul class="wp-block-list"><li>A <strong>DHCP </strong>server (to assign IP addresses on the local network with ability to fix some of them in a static list, for easier management)</li><li>A <strong>DNS </strong>server providing<ul><li>DNS request cache (to speed up the overall Internet access of my Internet users)</li><li>Delivery of local network names</li><li>Capacity to allow future DNS filtering (I don&#8217;t care much about adult-content filtering, but I&#8217;d like to stop some of the phishers, even if these two activities are technically identical)</li></ul></li></ul>



<p>In the future, some more services may come handy (nothing of this has been studied here):</p>



<ul class="wp-block-list"><li>An NTP server (for time)</li><li>A WINS Windows names server</li></ul>



<h2 class="wp-block-heading">Comparison</h2>



<p>As a matter of fact, I noticed that two serveurs seemed able to simultanesouly provide DHCP and DNS: <a href="https://nlnetlabs.nl/projects/unbound/about/">Unbound</a> and <a href="https://wiki.debian.org/dnsmasq">dsnmasq</a>.</p>



<p>Unbound highlights:</p>



<ul class="wp-block-list"><li>Lightweight server</li><li>DNSSEC support</li><li>rather security-oriented</li><li>No DNS authoritative server (but able to handle a local domain)</li></ul>



<p>dnsmasq highlights:</p>



<ul class="wp-block-list"><li> Lightweight server</li><li>DNSSEC support</li><li>DHCP and DNS are integrated in the same server</li><li>May use /etc/hosts to feed DNS</li><li>No DNS recursive server (only forward to an authoritative/recursive like 8.8.8.8 or 9.9.9.9 or your ISP DNS server)</li><li>No DNS authoritative server (but able to handle a local domain) </li></ul>



<p>I chose dnsmasq, mainly because of the DNS + DHCP integration.</p>



<h2 class="wp-block-heading">Some surprising discoveries</h2>



<p>Première information vite découverte : les serveurs NAS Synology sont tout à fait incompatibles avec le filtrage de DNS de CleanBrowsing. Celui-ci compte synology.me (service nécessaire pour le DDNS de Synology) dans les domaines à risque. De nombreux services du NAS cessent immédiatement de fonctionner.</p>



<p>Je n&#8217;ai pas vérifié mais il est probable que de nombreux autres services DDNS (Dynamic DNS) soient black-listés pour les mêmes raisons : devant le nombre de petits serveurs Synology (ou autres) mal configurés, ces DDNS renvoient sans doute vers une forte proportion de domaines qui ont été pris en otage par les hackers.</p>



<p>Il faut donc pouvoir gérer cela plus finement si vous avez vous-même votre propre NAS Synology (et sans doute d&#8217;autres marques).</p>



<h2 class="wp-block-heading">Observations</h2>



<p>After a few months of  dnsmasq use on Rapsberry Pi, it is time to comment and share my experience.</p>



<p>First, this worked really well. Even if I had one case of locked down DHCP server (no warning, no error, but killed). I tried finding why, but it was far easier to reboot the server box (On-Off switch) to restore the service. Of course, a few minutes of digging into logs did bring me some worried looks from another network user&#8230;</p>



<p>The DNS filter setup to remove access to some risky domains work perfectly well. But, I have to admit that nothing seems to have triggered that (except my tests). Since this is not the only security barrier on my network, this may be OK. For the record, here is the filter creation script I use:</p>



<pre class="wp-block-preformatted">#!/bin/sh
#Dated 2020-11-10 1.0 Addition of --quiet to wget (to reduce clutter to /var/mail/pi)
#                     *** STABLE RELEASE ***

cd /var/lib/work

#Get anti-phishing filter lists from Internet
wget -q -O ./isc-low.txt 'https://isc.sans.edu/feeds/suspiciousdomains_Low.txt'
wget -q -O ./isc-med.txt 'https://isc.sans.edu/feeds/suspiciousdomains_Medium.txt'
wget -q -O ./isc-hig.txt 'https://isc.sans.edu/feeds/suspiciousdomains_High.txt'
wget -q -O ./yoyo.dnsmasq.txt 'https://pgl.yoyo.org/adservers/serverlist.php?hostformat=dnsmasq&amp;hostformat=nohtml&amp;showintro=0&amp;mimetype=plaintext'
#Remodel the lists into DNSmasq filters
catcherIP='192.168.1.250'
inputfile="./isc-med.txt"
tmpfile="/tmp/.adlist.$$"
tmpconffile="/tmp/.dnsmasq.conf.$$"
configfile="/etc/dnsmasq.filter.conf"
configheader="/etc/dnsmasq.filter.header"

#Start with putting our own header
    [ -f "$configheader" ] &amp;&amp; cat $configheader &gt;&gt; $tmpconffile
#check if TmpFile could be init'd with header
if [ ! -s $tmpconffile ]
then
    echo "temp fil '$tmpconffile' could not be found or is empty; quitting"
    exit
fi
#Remove list headers
cat $inputfile | grep -v "^#" | grep -v "^Site$" &gt; $tmpfile
#Buid list to DNSmasq format, and add it to the file
sed "s/(.*)/address=\/\1\/${catcherIP}/" $tmpfile &gt;&gt; $tmpconffile
#Move the final list to destination
sudo cp $tmpconffile $configfile</pre>



<p>One of the advantages of this server is its speed. I may have been slightly worried (or attentive) before knowing the Raspberry Pi, but there was no reason. Maybe because of the low workload (despite an HTTP server, some distant connexions, and a few local scripts) and because of the good power developed by the CPU, everything is fine and dandy even when a dozen clients are pounding the DNS server (the iPhones are quite insistant in using the netowrk on a continuous basis)).</p>



<p>dnsmasq is perfectly able t manageIPv6 DHCP, and correspondingIPv6 DNS. Documentation about this is terse (if not simply lacking), but it works well and I learned quite a few things. The Raspberry Pi was so reliable that it was IPv6 proxy during some of my tests without any perceptible impact. (I was rightfully impressed).</p>



<p>After initially using dynamic address allocation, I moved the DHCP server into a nearly exclusively static configuration (my own choice in order to have easier local client identification). No big deal, neither in IPv4 nor in IPv6.</p>



<p>Conclusion: Totally positive.</p>



<p>In the future, I may be tempted to deploy more powerful servers for DHCP and DNS for a wider support (maybe or maybe not) and to try a network spy like SNORT or SURICATA. But this is a completely different story. And, in this case, I may be tempted to go to a really powerful solution (I have an Avenger96 under initial trial, but its software support seems to be a real mess).</p>



<h2 class="wp-block-heading">A few other interesting links</h2>



<ul class="wp-block-list"><li>A few other solutions for a DHCP server:<ul><li><a href="https://www.isc.org/dhcp-tools/"></a><a href="https://www.linux.com/tutorials/dnsmasq-easy-lan-name-services/">DNSmasq installation</a> (DHCP only)</li><li>Dragon: <a href="https://blogging.dragon.org.uk/howto-setup-dnsmasq-as-dns-dhcp/">DNSmasq installation</a> (DHCP + DNS)</li><li>Instructables: <a href="https://www.instructables.com/id/Running-your-own-DNSDHCP-Server-the-Easy-way/">installation for DNSmasq</a> (DHCP &amp; DNS)  </li><li><a href="https://wiki.debian.org/DHCP_Server">ISC-DHCP server on Debian</a></li><li><a href="https://www.tecmint.com/install-dhcp-server-in-ubuntu-debian/">ISC-DHCP server on Ubuntu</a></li><li><a href="https://wiki.debian.org/DHCP_Server">Tools designed to work with ISC-DHCP</a></li><li><a href="https://wiki.debian.org/DHCP_Server">Fast instructions for installing DHCP, DNS, </a><a href="http://www.raspberry-pi-geek.com/Archive/2014/03/Setting-up-Raspberry-Pi-as-a-DHCP-NTP-and-DNS-server">and NTP on Raspberry Pi</a></li></ul></li><li>Some data about installation of another DNS server:<ul><li><a href="https://www.digitalocean.com/community/tutorials/how-to-configure-bind-as-a-private-network-dns-server-on-debian-9">BIND local-mode DNS server on Debian 9</a></li><li><a href="https://www.digitalocean.com/community/tutorials/how-to-configure-bind-as-an-authoritative-only-dns-server-on-ubuntu-14-04">BIND authoritative DNS server on Ubuntu</a></li><li><a href="https://www.digitalocean.com/community/tutorials/how-to-configure-bind-as-a-caching-or-forwarding-dns-server-on-ubuntu-14-04">BIND &#8220;caching&#8221; or &#8220;forward-only&#8221; DNS server on Ubuntu</a></li></ul></li><li>DNS filters:<ul><li><a href="https://www.gmass.co/blog/domain-blacklists-comprehensive-guide/">THE guide on cleaning DNS from public domain lists</a></li></ul></li><li>Setup of a LaSynology NAS or router:<ul><li><a href="https://www.synology.com/fr-fr/knowledgebase/DSM/tutorial/Network/How_to_set_up_your_domain_with_Synology_DNS_Server">Configuration of a DNS server on DSM</a></li></ul></li><li>Server comparisons:<ul><li><a href="https://computingforgeeks.com/bind-vs-dnsmasq-vs-powerdns-vs-unbound/">BIND vs. dnsmasq vs PowerDNS vs Unbound</a><br><br> <br><br> </li></ul></li></ul>



<p></p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.roumazeilles.net/news/en/wordpress/2020/11/23/raspberry-pi-as-a-local-dns-dhcp-server/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Synology on a sub-domain (with a dynamic IP address)</title>
		<link>https://www.roumazeilles.net/news/en/wordpress/2014/09/28/synology-on-a-sub-domain-with-a-dynamic-ip-address/</link>
					<comments>https://www.roumazeilles.net/news/en/wordpress/2014/09/28/synology-on-a-sub-domain-with-a-dynamic-ip-address/#respond</comments>
		
		<dc:creator><![CDATA[Yves Roumazeilles]]></dc:creator>
		<pubDate>Sun, 28 Sep 2014 18:58:44 +0000</pubDate>
				<category><![CDATA[Internet]]></category>
		<category><![CDATA[Routers & networks]]></category>
		<category><![CDATA[CNAME]]></category>
		<category><![CDATA[DDNS]]></category>
		<category><![CDATA[DiskStation]]></category>
		<category><![CDATA[DNS]]></category>
		<category><![CDATA[dynamic]]></category>
		<category><![CDATA[IP addreess]]></category>
		<category><![CDATA[IPv4]]></category>
		<category><![CDATA[subdomain]]></category>
		<category><![CDATA[Synology]]></category>
		<guid isPermaLink="false">https://www.roumazeilles.net/news/en/wordpress/?p=13644</guid>

					<description><![CDATA[My problem: I&#8217;ve got a Fiber connexion to the Internet (at Numéricable, one of the main ISP in France) which is forcing a dynamic IP address on me (no fixed IP address, even with a premium; They&#8217;ve settled in the XXth century). This would not be very serious except that I host a RAID server [&#8230;]]]></description>
										<content:encoded><![CDATA[<h3>My problem:</h3>
<p>I&#8217;ve got a Fiber connexion to the Internet (at Numéricable, one of the main ISP in France) which is forcing a dynamic IP address on me (no fixed IP address, even with a premium; They&#8217;ve settled in the XXth century). This would not be very serious except that I host a RAID server from Synology (a DS413j DiskStation with 4 hard drives in RAID-5 redundant mode) which provides several services I would like to share with the Internet (while I&#8217;m travelling with my iPhone or my laptop, I&#8217;d like to get access to my files through FTP, or my email server).</p>
<p>So, I decided to set things right in order to appropriately locate the Synology DiskStation in a sub-domain of my own (e.g. <code>mail.roumazeilles.net</code>).</p>
<h3>The solution I opted for:</h3>
<h4>Dynamic IP addess:</h4>
<p>Since my IP address is dynamic, there&#8217;s no way I can progress until I solved this single issue. I chose to use the DDNS service DDNS from Synology. Since I use DSM 5.0 (the most recent software version from Synology), I can reach the appropriate option through the control panel and the &#8220;External access&#8221; menu. I just added a DDNS, selecting Synology as a service supplier, and I recorded the name I wanted (let&#8217;s say <code>ds</code>). From this point, despite the IP address changes, my DiskStation is always accessible at <code>ds.synology.me</code>.</p>
<h4>DNS subdomain:</h4>
<p>After that, I need to point <code>mail.roumazeilles.net</code> onto <code>ds.synology.me</code>. This is slightly more complex because my <code>roumazeilles.net</code> domain nam is reserved atz <a href="http://www.gandi.net/" title="Gandi">Gandi</a> and it is pointed toward a server hosted by <a href="http://www.ovh.net/" title="OVH">OVH</a>. It&#8217;s the hosted server (rented from OVH) which includes all the information relating to <code>roumazeilles.net</code>. So, I went to my server control panel and, in its DNS configuration, I modified (in your case, you may need to add) a CNAME record.</p>
<p><code>mail 10800 IN CNAME ds.synology.me.</code> <em>(Don&#8217;t forget the final dot/period in your CNAME entry, or it won&#8217;t work!) </em><br />
Since I am lucky, my control panel at OVH includes an easy way to get the correct syntax (it&#8217;s safer): I tell it the <code>mail</code> subdomain is described by a <code>CNAME</code> record pointing to <code>ds.synology.me</code> (a bit terse, but not difficult).</p>
<p>Then, I only had to wait for the DNS information to &#8220;propagate&#8221; (from a few minutes to a few hours, sometimes up to 24-48 hours). And a little check using <code>ping mail.roumazeilles.net</code> confirmed that it answered from my Numéricable IP address.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.roumazeilles.net/news/en/wordpress/2014/09/28/synology-on-a-sub-domain-with-a-dynamic-ip-address/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>1 minute for a faster Internet (DNS)</title>
		<link>https://www.roumazeilles.net/news/en/wordpress/2009/12/08/1-minute-for-a-faster-internet-dns/</link>
					<comments>https://www.roumazeilles.net/news/en/wordpress/2009/12/08/1-minute-for-a-faster-internet-dns/#respond</comments>
		
		<dc:creator><![CDATA[Yves Roumazeilles]]></dc:creator>
		<pubDate>Mon, 07 Dec 2009 22:36:19 +0000</pubDate>
				<category><![CDATA[Apple]]></category>
		<category><![CDATA[Internet]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Routers & networks]]></category>
		<category><![CDATA[Windows 7]]></category>
		<category><![CDATA[Windows Vista]]></category>
		<category><![CDATA[benchmark]]></category>
		<category><![CDATA[DNS]]></category>
		<category><![CDATA[Google]]></category>
		<category><![CDATA[Google DNS]]></category>
		<category><![CDATA[server]]></category>
		<guid isPermaLink="false">https://www.roumazeilles.net/news/en/wordpress/?p=3857</guid>

					<description><![CDATA[There are few things that you can do to significantly improve the speed of your Internet connection. Of course, you can switch to another Internet Service Provider, but it&#8217;s a mess. On the opposite, it is easy to have an sub-optimal connection because of the response time of the DNS server of your Internet Provider. [&#8230;]]]></description>
										<content:encoded><![CDATA[<p><a href="http://code.google.com/p/namebench/"><img fetchpriority="high" decoding="async" src="https://www.roumazeilles.net/news/fr/wordpress/wp-content/uploads/2009/12/namebench_macosx.png" alt="namebench_macosx" title="namebench_macosx" width="550" height="308" class="aligncenter size-full wp-image-4223" /></a></p>
<p>There are few things that you can do to significantly improve the speed of your Internet connection. Of course, you can switch to another Internet Service Provider, but it&#8217;s a mess. On the opposite, it is easy to have an sub-optimal connection because of the response time of the DNS server of your Internet Provider. This server offers a translation service a domain name (for example, www.roumazeilles.net) into its equivalent numeric IP address (the only one that the web browser really understands and needs).</p>
<p>But all DNS servers are not born equal and if those offered by your Internet Service Provider (ISP) have an advantage (they are nearer to your own computer), they are not always the fastest ones. <a href="http://code.google.com/p/namebench/">NameBench</a> gives you the opportunity to easily and automatically check what DNS server is the most efficient (and to compare it with your own current DNS configuration).</p>
<p>In my own personal case, I just reduced DNS times by 50% (no less!) while I thought I had a rather good configuration. As a matter of fact, Neuf Telecom servers are faster that those from Free&#8230;</p>
<p>This works on Windows, MacOS as well as GNU/Linux.</p>
<p>By the way, for those of you who may be wondering, Yes! I included the all new Google DNS as one of the tested options and it was far slower than most of the other freely available possibilities.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.roumazeilles.net/news/en/wordpress/2009/12/08/1-minute-for-a-faster-internet-dns/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
	</channel>
</rss>
