0

I have two Ubuntu Servers (S1 & S2 for example) on two different public IP’s (static & are in different locations). I got a domain name from GoDaddy. Lets call it, example.com.

I have setup Bind on S1 and opened DNS port. I told GoDaddy zone file to direct hostname (example.com) to my Public IP that S1 is on. Then I pinged the domain and got a reply back showing the public IP. This sounds like the correct DNS setup correct?

Now I have another Ubuntu Server with a static public IP address. How can I attach a subdomain such as sub1.example.com to that public IP with Ubuntu Server S2? Would I need Bind on every server, even though it’s one domain name?

1 Answer 1

1

No, BIND is not required on every box. You only need BIND (or you can use GoDaddy's name servers to do it) on a single box to do your work.

As far as setting up a subdomain, you'll need to setup a Zone file on your BIND server. Here's a decent site to explain a way to do that:

http://www.zytrax.com/books/dns/ch9/subdomain.html

3
  • So what you are saying is if I put in the zone file that sub1 points to your public IP on the Server not hosting bind that would work? Would you need to open port 53 onthe server the subdomain points to. Can it be any other port? I know basic networking, I'm just confused because of the client-server model when it comes to this. If I don't install Bind on the Server with subdomain how does it know what service the subdomain is pointing to ? Mar 25, 2015 at 15:45
  • Are you saying the subdomain is just refrenced to the IP to the Server? That way any services that are forwarded will see that IP blah blah resolves to sub1.example.com? (This is what i'm thinking) Mar 25, 2015 at 15:47
  • The absolutely simplest solution is to have the DNS server which already resolves example.com also serve the subdomain sub1.example.com. You don't have a Bind server of your own anywhere and example.com works fine. If you want to run a DNS server of your own, you still need to make changes on the server which currently serves your DNS records to set that up.
    – tripleee
    Mar 26, 2015 at 23:08

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .