Dynamic DNS, Android Phones, IPv6 and DNSMASQ Follow-up.

Hello,

This is a follow-up to my previous post.

On that post I did show how to set up DNSMASQ so it can be used as a DHCPV6 alternative so IPv6 smart clients receive IPv6 addresses and be able to do DDNS and thus be able to have human readable names under IPv6.

I also pointed out that you could use DNSMASQ as a forwarder.

So the configuration used was:

interface=wlan0
dhcp-range=10.x.x.10,10.x.x.20,255.255.255.0,12h
dhcp-range=fd00:d:6680:7d::2,fd00:d:6680:7d::10,ra-names,slaac,2h
no-hosts
enable-ra
domain=YOURDOMAIN.COM
addn-hosts=/etc/hosts.dnsmasq
#dhcp-host=XX:XX:XX:XX:XX:XX,net:allow
dhcp-host=11:22:33:44:55:66,net:allow
#dhcp-host=xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx,net:allow
dhcp-host=11:22:33:44:55:66:77:77:88:99:AA:BB:CC:DD:EE:FF,net:allow

Let’s assume that:

  • Your wifi interface is wlan0
  • Your LAN interface is eth0
  • Your domain is yourdomain.com

We will tell DNMASQ to create domain wifi.yourdomain.com

The configuration will change to:

interface=wlan0
interface=eth0
no-dhcp-interface=eth0
dhcp-range=10.x.x.10,10.x.x.20,255.255.255.0,12h
dhcp-range=fd00:d:6680:7d::2,fd00:d:6680:7d::10,ra-names,slaac,2h
no-hosts
enable-ra
domain=WIFI.YOURDMOMAIN.COM
addn-hosts=/etc/hosts.dnsmasq
#dhcp-host=XX:XX:XX:XX:XX:XX,net:allow
dhcp-host=11:22:33:44:55:66,net:allow
#dhcp-host=xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx,net:allow
dhcp-host=11:22:33:44:55:66:77:77:88:99:AA:BB:CC:DD:EE:FF,net:allow

On the configuration above, interface=eth0 tells DNSMASQ to listen to DNS requests on that interface.

The second command no-dhcp-interface=eth0, also tells DNSMASQ not to listen for DHCP requests on that interface.

Now on your main DNS server, you just need to set it up so when a DNS request for xxx.wifi.YOURDOMAIN.COM is received, it forwards the requests to the IP address of your DNSMASQ server.

Your are set.

Ciao,

Miguel.

Leave a Reply

Your email address will not be published. Required fields are marked *