[SOLVED] How does Slackware send a resolvable name to a ddns
SlackwareThis Forum is for the discussion of Slackware Linux.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
How does Slackware send a resolvable name to a ddns
Sorry if this is a stupid question. I'm just trying to understand it.
I have Slackware 14 configured for DHCP. When I restart inet1 and look at the messages with wireshark I see the hostname sent on the dhcp discover, but not the fully qualified domain name.
So how does a ddns get a domain name that it can resolve to my box?
dog.fred.com
dog.barney.com
it only sends "dog" so how does it determine the rest?
/etc/HOSTNAME:
dog.fred.com
/etc/hosts:
127.0.0.1 localhost
192.168.1.103 dog.fred.com dog
/etc/dhcpcd.conf and /etc/rc.d/rc.inet1.conf are untouched.
DDNS is mechanism for your DHCP server to update your nameserver with information about dynamic IP addresses it has assigned. It is a communication method between a DHCP server and a nameserver. You need to be running a nameserver such as bind or dnsmasq somewhere on your network, and a DHCP server that assigns dynamic IP addresses to hosts on your network.
You define a zone file in your nameserver for your domain name. You define static hosts in the zone file with their fixed IP addresses. DDNS doesn't come into play for them. For the hosts with dynamic IP addresses, your DHCP server must inform your nameserver what IP address to add to the zone file.
Most home router/gateway appliances have a built in DHCP server to assign dynamic IP addresses on the local LAN, but they usually don't have a DNS nameserver, so they don't use DDNS.
Where I work, I'm not sure of what they have running but I think its a combo of unix and windows systems for dns and ddns (win/dns?).
But anyways, at work, I can set up my slackware with netconfig for DHCP, and set the hostname to anything I want with the company's domain name. I can then use that url that I picked in a browser on another computer and it is resolved to my slackware box.
It is not a static IP and nobody is typing the url I picked into any system. I can change the hostname, reboot my box and the new url is immediately available to resolve to my slackware box again.
I don't want to post the actual URLs on a global forum for obvious reasons, but the url's are like: abc22.dog.nebraska.mycompany.net, where the "abc22.dog.nebraska" part is made-up and only the abc22 is the hostname. So the /etc/hosts looks like:
Location: Geneva - Switzerland ( Bordeaux - France / Montreal - QC - Canada)
Distribution: Slackware 14.2 - 32/64bit
Posts: 609
Rep:
Anyway, it's not Slackware specific somehow... Slackware use "vanilla" packages, so the answer to your question might be to look into the official DDNS system doc... Have you looked at this:
It might be a bit old but it's still relevant I guess.
I'm not a specialist in this "domain" (huhuhu), so I can't help you in depth.
Also, sorry if my previous post seemed to be intrusive, it was a clumsy way to ask you if you used an officially registered domain name or were just using an already existing name incidentally, I guess it might change the behavior.
Bests.
Last edited by NoStressHQ; 10-03-2013 at 09:14 AM.
But anyways, at work, I can set up my slackware with netconfig for DHCP, and set the hostname to anything I want with the company's domain name. I can then use that url that I picked in a browser on another computer and it is resolved to my slackware box.
It is not a static IP and nobody is typing the url I picked into any system. I can change the hostname, reboot my box and the new url is immediately available to resolve to my slackware box again.
Quote:
Originally Posted by coldbeer
So I don't understand how this is being done when on wireshark, I only see the 'zzz44' part being sent out.
It's like I said. Your company runs its own DNS servers and its own DHCP server. The DHCP server hands out dynamic IP addresses on the local network, and whenever it does so, it uses a DDNS key that is known to it and to the DNS server to tell the DNS server about the new host name and IP address. The DNS server updates its zone file accordingly. The zone file in the nameserver is what knows about the fqdn and keeps track of the hosts within it. Now when anyone on the local network tries to resolve your host name, the DNS server finds it in its zone file.
If you want to set up something like that on your home network, you need to configure either BIND (named) or dnsmasq as your name server (DNS server), and dhcpd as your DHCP server. A system running Slackware is perfect for that, since bind, dnsmasq, and dhcpd are already installed and waiting for you to configure them and turn them on. Setup can be a bit tricky the first time you go through it, especially with BIND.
Most home router/gateway devices have a built-in DHCP server that hands out dynamic IP addresses, but they don't usually have a DNS server, so there is no nameserver to get DDNS updates. If you make your Slackware-based DHCP server authoritative for your network, then you can turn off the one that runs in your router. Or you could leave it running as a backup in case the system hosting your own DHCP server is down.
I would suggest you pick a system that is active 24x7 on your network to run your primary nameserver and your DHCP server.
Does any of that make sense, or have I misunderstood what you are trying to do?
Look at /etc/rc.d/rc.dhcpd, /etc/rc.d/rc.bind, and /etc/rc.d/rc.dnsmasq, and their related config files in /etc. You'll need one or the other of bind or dnsmasq, but not both.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.