0

I recently built a dedicated server with Ubuntu 16.04 and the only thing left to do is set the DNS/Nameservers on it to start hosting other domains on it.

I'm getting really confused about what to do here.

------------ What I've Done So far

I created an account with EasyDNS to use as my host DNS. I added an A record in this account to point to my server.

I added dns-nameservers 111.222.333.444 to the /etc/network/interfaces file. I noticed my interface has this line: iface p6p1 inet static and not the eth0 I see on other articles.

I added to the /etc/resolv.conf/head the 3 nameservers that were assigned to me through EasyDNS, after rebooting the server, these name servers showed in /etc/resolv.conf.

Added server to /etc/hostname

Altered the line in etc/hosts to 111.222.333.444 server.easydnsdomain.com server

I even installed and ran ddclient, even though I don't think thats needed since I have a static IP.

-------------Testing my domains

I tried adding some domains to see if it would work

I changed one domain's nameservers to my EasyDNS nameservers, when this didn't work I added in the EasyDNS records an A record from my domain to my servers IP

On a seperate domain I left nameservers as default, went to advanced DNS and added an A record pointint to my easyDNS nameservers IP. I also tried just adding an A record pointing to my server.

When I ping these domains I get unknown host example.com . When I enter command host example.com I get example.com not found: 5(REFUSED)

Any thoughts on what I missing or done wrong? Thanks for the help!

4
  • 1
    Just saw that you did add a A record. Well did you give the easyDNS enough time to update the entry sometimes it takes a while. You can test directly if you install the package dnsutils and then type in your terminal nslookup your.domain.com dns1.easydns.com for example or more specific the one that you actually made the configurations on – Ziazis Jun 14 '16 at 11:42
  • Thanks, that command line is new to me. I tried it on my test domains and here are the resaults from nslookup example.com: ;; Got recursion not available from 1.2.3.4, trying next server ;; Got recursion not available from 2.3.4.5, trying next server Server: 3.4.5.6 Address: 3.4.5.6#53 I also tried nslookup google.com and received the same results – okcpitt Jun 14 '16 at 16:00
  • Hmm?? Are you changing the IPs or are they literally 1.2.3.4, 3.4.5.6 ? Because that can't work. If you put there your own static IP it is also wrong unless you do have a DNS installed on your server. – Ziazis Jun 15 '16 at 6:49
  • @okcpitt Have you read any documentation so far ? – userDepth Jun 16 '16 at 14:57
0

Please review these steps - Source


The default setup of Ubuntu does not make it easy to use static DNS servers while using DHCP. If you use the standard ubuntu way of networking (ifupdown), you can edit /etc/network/interfaces

In that file you find the entry for your interface. If your interface is eth0, then look for the following lines:

auto eth0
iface eth0 inet dhcp
Add one line, so it looks like:

auto eth0
iface eth0 inet dhcp
dns-nameservers ip.address.of.nameserver
Run

sudo invoke-rc.d networking restart
To make the changes effective

If you do not use ifupdown, you need to edit /etc/dhcp3/dhclient.conf

Find the lines

#prepend domain-name-servers 127.0.0.1;
request subnet-mask, broadcast-address, time-offset, routers,
        domain-name, domain-name-servers, host-name,
        netbios-name-servers, netbios-scope;
And change them to

prepend domain-name-servers 1.2.3.4, 1.2.3.5;
request subnet-mask, broadcast-address, time-offset, routers,
        domain-name, host-name,
        netbios-name-servers, netbios-scope;
Replace 1.2.3.4 and 1.2.3.5 with the addresses of your DNS servers.

Run

sudo invoke-rc.d networking restart
To make the changes effective:


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.