LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Server (https://www.linuxquestions.org/questions/linux-server-73/)
-   -   How to associate my IP with a domain name? (https://www.linuxquestions.org/questions/linux-server-73/how-to-associate-my-ip-with-a-domain-name-571242/)

ManOnTheDollar 07-21-2007 04:28 PM

How to associate my IP with a domain name?
 
I have Ubuntu running Apache server. People anywhere (outside my LAN) can access the website it is serving by going to my IP address, so I know I have everything set up correctly thusfar.

Now what I would like to do is associate a domain name with my (static) IP address so that people can access it by going to that domain, just like any other website in the world. I have a few domains registered from a couple years ago, so that's all set. I just don't know how to link it to my computer.

I assume this requires bind? I downloaded bind9 and followed a tutorial to set it up, but even in the tutorial it seemed to expect that I already had nameservers elsewhere (ns1.something.com), so I guess bind isn't the only thing I need. I'd rather not use something like DynDNS, I want to do this fully on my own, you know?

So, how can I do this? Any help is appreciated. I don't really need a full hand-held walkthrough since I'm pretty good with Google, but I just need to know, like, what elements I need to be setting up, or if it's even possible.

Thanks!

MS3FGX 07-21-2007 04:43 PM

You would do this on the domain registrar side, not the actual server. You need to tell whoever you have the domain name registered with what the static IP of your server is, and they will update their records and push it out to all of the DNS servers.

ManOnTheDollar 07-21-2007 05:08 PM

Quote:

Originally Posted by MS3FGX
You would do this on the domain registrar side, not the actual server. You need to tell whoever you have the domain name registered with what the static IP of your server is, and they will update their records and push it out to all of the DNS servers.

Thanks for your reply. Wouldn't I have to set up some sort of nameserver on my server first? Usually when I switch hosting companies, it's the nameservers I change in the domain registration. Isn't that different than a normal web server?

MS3FGX 07-21-2007 05:37 PM

The DNS servers you put into the server's configuration are so that the server can resolve hostnames for itself, not the other way around. You would change these when you switched ISPs, but that is just because each ISP runs their own DNS servers that they would prefer (though you can use whatever ones you want) their subscribers use.

You want people on the outside to be able to resolve your hostname. Since you don't have control over the root DNS servers on the Internet (that is where the DNS registrar comes in) you have no control over it directly. Nothing you can do on the server side will ever make a person on their home computer be able to resolve the IP of your server, that needs to be done at a higher level than you have access to.

Now, it could be that the registrar you have only allows you to point your domain name to another DNS server, and then that DNS server resolves the hosts on said domain. That would depend on your registrar, so you need to figure out exactly what they want first. Since you only have a single server on a static IP, hopefully you won't need to do that.

Matir 07-23-2007 02:34 PM

The registrar updates the root servers to point to YOUR DNS servers. These then resolve actual hostnames into IP addresses. I like djbdns for a DNS server: it's both lightweight and very secure. Check it out. :)

ManOnTheDollar 07-23-2007 03:01 PM

Thanks guys, I see now I was, um, stupid, and didn't understand things as much as I thought I did. So I decided not to use my own DNS, and I went with domain-dns.com. It works, I've set up subdomains, I'm sickeningly happy with myself.

Now here's a different question. My ISP (Charter :( ) blocks port 80, sooo right now I have to use mydomain.com:1985, which is pretty ugly. Is there a DNS that still lets me keep my own domain, but somehow "internally" redirects to port 1985, so people don't have to specify a port when they're typing my domain? Or is that a "different thing" and not really a DNS?

JimBass 07-23-2007 03:30 PM

That is entirely different. All DNS does is resolve a name to an IP address. It could care less if the intended port is 1, 22, 80, or 9999.

That being said, some companies offer a transparent proxy service that will mask the special port at the end of the address. The problem is these are paid services, and generally not worth it.

Also, your ISP blocks 80 because they don't want people running websites from their homes, they want you to pay for a business level of service. Right or wrong, if they catch you running a site from home, they can cancel your service. Some ISPs are tolerant of it, and some aren't. I strongly urge you to check with your ISP before you go through with this.

There also is another thread going on right now asking the exact same thing in this same forum -

http://www.linuxquestions.org/questi...d.php?t=571415

Peace,
JimBass

nileshgr 09-10-2007 08:23 AM

I have a similar problem. My friend has bought a domain. his site is gonna be on my server. the site will be located in a separate directory in /home (httpd userdirs enabled) . my server does not have a domain name. its just under a free service of noip. (itk.zapto.org) what is the nameserver which i shud give him to point to his site? Which part of BIND has to be configured. I have installed Webmin which a GUI interface for configuring BIND, httpd, mysqld, many more system wide apps, etc.

See this webmin screenshot of BIND section:

http://itk.zapto.org/scr/bind.png

Tell which section to configure?


All times are GMT -5. The time now is 02:28 AM.