Jump to content

help with DNS/nameservers

Go to solution Solved by Mark77,

In a nutshell, "mywebsite.com" has to be registered with a nameserver for the .com top-level domain (TLD).  The nameserver for the TLD will respond to queries for "*.mywebsite.com" by directing them to a subordinate nameserver listed in the database of .com domains.  The software that does this is typically called "BIND", "Berkeley Internet Name Database" named after the University it was developed at, UC Berkeley.

 

So basically you have to do 2 things:

 

a)  Register with a TLD registrar.  There's a variety of vendors.  A highly advertised one is "GoDaddy".

b)  Set up a name server for your domain using BIND (or similar) with details applicable to your own domain.  And typically at least one backup.  You can either do this yourself or get a commercial service provider to do it for you.

 

BTW, 192.168.x.x are not publicly routable Internet addresses, so if your web server is on such an address, it will never be publicly accessible unless you have the ports forwarded to a machine that is publicly accessible. 

Its actually getting ridiculous how I just cannont find anything to help me understand this whole dns and nameserver thing... ive litterally been looking on the internet for three hours now trying to figure it out so hopefully you someone from the ltt community can expain to my noobish ass what i'm doing.

 

Just to clarify I know what dns is and I know what a nameserver is and what it does. Correct me if i'm wrong, the nameserver runs some form of dns to change www.linustechtips.com into 192.168.x.x so the computer can understand it.

 

My question is how do I set it up? I have a server running Ubuntu Server 15.10 and I basically have got my website that people can connect to with the ip of www.192.168.x.x.com but I want so that its something like www.mywebsite.com. So how do I make a nameserver and how do I set it up so that it so I can do that?

Current Build: CPU - AMD 5800K 4.2GHz w/ Stock Cooler :( | Motherboard - ASRock FM82A88 Extreme 4 Plus | Memory - Crucial 8GB Single Stick 1600MHz | GPU - AMD Radeon R7 260X 2GB | Storage - Seagate Barracuda 1TB 7200RPM

Project: Just let me play Black Ops... PLEASE!!! - https://uk.pcpartpicker.com/user/ion529/saved/#view=VKm9TW

Link to comment
Share on other sites

Link to post
Share on other sites

In a nutshell, "mywebsite.com" has to be registered with a nameserver for the .com top-level domain (TLD).  The nameserver for the TLD will respond to queries for "*.mywebsite.com" by directing them to a subordinate nameserver listed in the database of .com domains.  The software that does this is typically called "BIND", "Berkeley Internet Name Database" named after the University it was developed at, UC Berkeley.

 

So basically you have to do 2 things:

 

a)  Register with a TLD registrar.  There's a variety of vendors.  A highly advertised one is "GoDaddy".

b)  Set up a name server for your domain using BIND (or similar) with details applicable to your own domain.  And typically at least one backup.  You can either do this yourself or get a commercial service provider to do it for you.

 

BTW, 192.168.x.x are not publicly routable Internet addresses, so if your web server is on such an address, it will never be publicly accessible unless you have the ports forwarded to a machine that is publicly accessible. 

Link to comment
Share on other sites

Link to post
Share on other sites

192.168.x.x is your local IP for computers connected to the same network

you need to port forward the website ports (I think its 80)

then you setup your A records with your domain to your public IP

Thats that. If you need to get in touch chances are you can find someone that knows me that can get in touch.

Link to comment
Share on other sites

Link to post
Share on other sites

1 minute ago, Mark77 said:

In a nutshell, "mywebsite.com" has to be registered with a nameserver for the .com top-level domain (TLD).  The nameserver for the TLD will respond to queries for "*.mywebsite.com" by directing them to a subordinate nameserver listed in the database of .com domains.  The software that does this is typically called "BIND", "Berkeley Internet Name Database" named after the University it was developed at, UC Berkeley.

 

So basically you have to do 2 things:

 

a)  Register with a TLD registrar.  There's a variety of vendors.  A highly advertised one is "GoDaddy".

b)  Set up a name server for your domain using BIND (or similar) with details applicable to your own domain.  And typically at least one backup.  You can either do this yourself or get a commercial service provider to do it for you.

 

BTW, 192.168.x.x are not publicly routable Internet addresses, so if your web server is on such an address, it will never be publicly accessible unless you have the ports forwarded to a machine that is publicly accessible. 

Thanks for the help <3 Two questions:

 

What does BIND run on? I am going to be using a .ie domain since I live in Ireland which means that I have to have at least 2 nameservers. Will I have to build another two computers in addition to my server to use as nameservers?

 

And just in relation to the 192.168.x.x thing I just screwed up and I meant public IP. I portfowarded my router and my website is my public ip. Is it still publicly accessible or am I still missing something?

 

Current Build: CPU - AMD 5800K 4.2GHz w/ Stock Cooler :( | Motherboard - ASRock FM82A88 Extreme 4 Plus | Memory - Crucial 8GB Single Stick 1600MHz | GPU - AMD Radeon R7 260X 2GB | Storage - Seagate Barracuda 1TB 7200RPM

Project: Just let me play Black Ops... PLEASE!!! - https://uk.pcpartpicker.com/user/ion529/saved/#view=VKm9TW

Link to comment
Share on other sites

Link to post
Share on other sites

8 minutes ago, thekeemo said:

192.168.x.x is your local IP for computers connected to the same network

you need to port forward the website ports (I think its 80)

then you setup your A records with your domain to your public IP

Yep I've portfowarded that port and the web address is my public Ip I think I just screwed up cus im in a rush :P

 

What do you mean by my "A Records"? and is it just as simple as linking the two with my domain providers console once I have the nameservers?

Current Build: CPU - AMD 5800K 4.2GHz w/ Stock Cooler :( | Motherboard - ASRock FM82A88 Extreme 4 Plus | Memory - Crucial 8GB Single Stick 1600MHz | GPU - AMD Radeon R7 260X 2GB | Storage - Seagate Barracuda 1TB 7200RPM

Project: Just let me play Black Ops... PLEASE!!! - https://uk.pcpartpicker.com/user/ion529/saved/#view=VKm9TW

Link to comment
Share on other sites

Link to post
Share on other sites

7 minutes ago, ion529 said:

What does BIND run on? I am going to be using a .ie domain since I live in Ireland which means that I have to have at least 2 nameservers. Will I have to build another two computers in addition to my server to use as nameservers?

Typically most people find a service provider to do this for them, so you just tell them what to do, and pay them an annual fee for service.  bind is traditionally Unix software, but there is Windows software that can provide the same functionality.  Basically they usually want you to have a primary and a secondary nameserver, both on static IP addresses

 

I guess they could be both running in virtual machines (or two instances of bind bound to different IP addresses on a single machine), but typically most organizations will distribute it over multiple physical machines in different geographic locations for redundancy. 

 

7 minutes ago, ion529 said:

And just in relation to the 192.168.x.x thing I just screwed up and I meant public IP. I portfowarded my router and my website is my public ip. Is it still publicly accessible or am I still missing something?

 

Well if you're on a dynamic IP, you'll need to use a service like dyn.org (or similar), and then, either through them, or another provide, provide  a "CNAME" record in the DNS to point to the dyn.org-provided address.  If your computer receives email through SMTP, you can also implement a MX record (for mail backup).

 

Of course, for your website to be accessible to the public, your ISP can't be blocking port 80.  You might want to investigate whether they do that before you get too deep into such.  Some ISPs really don't like people running "servers" on their networks.

 

 

Link to comment
Share on other sites

Link to post
Share on other sites

1 minute ago, Mark77 said:

Typically most people find a service provider to do this for them, so you just tell them what to do, and pay them an annual fee for service.  bind is traditionally Unix software, but there is Windows software that can provide the same functionality.  Basically they usually want you to have a primary and a secondary nameserver, both on static IP addresses

 

I guess they could be both running in virtual machines (or two instances of bind bound to different IP addresses on a single machine), but typically most organizations will distribute it over multiple physical machines in different geographic locations for redundancy. 

 

 

Well if you're on a dynamic IP, you'll need to use a service like dyn.org (or similar), and then, either through them, or another provide, provide  a "CNAME" record in the DNS to point to the dyn.org-provided address.  If your computer receives email through SMTP, you can also implement a MX record (for mail backup).

 

Sorry, maybe someone else can provide a dumbed-down version of what I'm saying. 

Unfortunatly i'm not a typical person so I would like to try and make the nameservers myself :P what kind of machine is required to run this off? Do you think I could run two VMs of a raspberry pi or even run three VMs of one machine - one for the server, and then two smaller ones for the nameservers? how much resources do nameservers require?

 

As for the dynamic IP I get what your saying - I need a static ip for the web address to stay constant. That I can do with a quick phonecall to virgin media. If I have a static IP is my website publically accesible? Thanks for your help btw :D

Current Build: CPU - AMD 5800K 4.2GHz w/ Stock Cooler :( | Motherboard - ASRock FM82A88 Extreme 4 Plus | Memory - Crucial 8GB Single Stick 1600MHz | GPU - AMD Radeon R7 260X 2GB | Storage - Seagate Barracuda 1TB 7200RPM

Project: Just let me play Black Ops... PLEASE!!! - https://uk.pcpartpicker.com/user/ion529/saved/#view=VKm9TW

Link to comment
Share on other sites

Link to post
Share on other sites

Just now, ion529 said:

Unfortunatly i'm not a typical person so I would like to try and make the nameservers myself :P what kind of machine is required to run this off? Do you think I could run two VMs of a raspberry pi or even run three VMs of one machine - one for the server, and then two smaller ones for the nameservers? how much resources do nameservers require?

Yeah it would be trivial to do that on Raspberry Pi's for the sort of workload you're implying.  But seriously most people just pay someone to run those nameservers for them.

 

2 minutes ago, ion529 said:

As for the dynamic IP I get what your saying - I need a static ip for the web address to stay constant. That I can do with a quick phonecall to virgin media. If I have a static IP is my website publically accesible? Thanks for your help btw :D

 

Well you can do it with a dynamic IP, but you need not only a script on your computer to monitor/update when the IP changes, but you would also need a service like offered through dyn.org to actually accept such commands.  A static IP means that you can arrange for a Class A record in the nameservers (as discussed above) directly to your static IP address.

 

What I personally suggest is that you pay dyn.org for dynamic DNS, and then either through them, or through some other service (ie: GoDaddy,etc.), you create a CNAME record in your  registered domain, to the "dynamic" domain name.

 

 

 

Link to comment
Share on other sites

Link to post
Share on other sites

4 minutes ago, Mark77 said:

Yeah it would be trivial to do that on Raspberry Pi's for the sort of workload you're implying.  But seriously most people just pay someone to run those nameservers for them.

 

 

Well you can do it with a dynamic IP, but you need not only a script on your computer to monitor/update when the IP changes, but you would also need a service like offered through dyn.org to actually accept such commands.  A static IP means that you can arrange for a Class A record in the nameservers (as discussed above) directly to your static IP address.

 

What I personally suggest is that you pay dyn.org for dynamic DNS, and then either through them, or through some other service (ie: GoDaddy,etc.), you create a CNAME record in your  registered domain, to the "dynamic" domain name.

 

 

 

How resource instensive are nameservers?

 

Lets pretend I have a static IP. So I have to link my IPV4 address of my Server to my two nameservers, My two nameservers take in the www.mywebsite.whatever and spit out the www.MyServerIP.com and route the request to back to my server. Meanwhile I have to register my nameservers with BIND so that the DNS can route requests to my server. Jesus Christ this is alot more complicated than I though.....

Current Build: CPU - AMD 5800K 4.2GHz w/ Stock Cooler :( | Motherboard - ASRock FM82A88 Extreme 4 Plus | Memory - Crucial 8GB Single Stick 1600MHz | GPU - AMD Radeon R7 260X 2GB | Storage - Seagate Barracuda 1TB 7200RPM

Project: Just let me play Black Ops... PLEASE!!! - https://uk.pcpartpicker.com/user/ion529/saved/#view=VKm9TW

Link to comment
Share on other sites

Link to post
Share on other sites

3 minutes ago, ion529 said:

 How resource instensive are nameservers?

Extremely minimal.  There's a lot of caching in the DNS hierarchy.

 

3 minutes ago, ion529 said:

Lets pretend I have a static IP. So I have to link my IPV4 address of my Server to my two nameservers, My two nameservers take in the www.mywebsite.whatever and spit out the www.MyServerIP.com and route the request to back to my server. Meanwhile I have to register my nameservers with BIND so that the DNS can route requests to my server. Jesus Christ this is alot more complicated than I though.....

Yes, complicated.  That's why nearly everybody either engages an external service provide to do the nameserver stuff, or engages a provider to do not only the nameserver stuff, but also the web serving itself.  Or they rig something up using dyn.org like I described.

 

 

 

Link to comment
Share on other sites

Link to post
Share on other sites

Just now, Mark77 said:

Extremely minimal.  There's a lot of caching in the DNS hierarchy.

 

Yes, complicated.  That's why nearly everybody either engages an external service provide to do the nameserver stuff, or engages a provider to do not only the nameserver stuff, but also the web serving.  Or they rig something up using dyn.org like I described.

 

 

Alright sounds good, Im gonna try figure out how to run three VMs now. thanks man <3

Current Build: CPU - AMD 5800K 4.2GHz w/ Stock Cooler :( | Motherboard - ASRock FM82A88 Extreme 4 Plus | Memory - Crucial 8GB Single Stick 1600MHz | GPU - AMD Radeon R7 260X 2GB | Storage - Seagate Barracuda 1TB 7200RPM

Project: Just let me play Black Ops... PLEASE!!! - https://uk.pcpartpicker.com/user/ion529/saved/#view=VKm9TW

Link to comment
Share on other sites

Link to post
Share on other sites

Just now, ion529 said:

Alright sounds good, Im gonna try figure out how to run three VMs now. thanks man <3

You'd need unique IP real-world IP addresses for them as well.  As I said, its way, way less hassle just to pay someone to do the DNS stuff than to try and run your own DNS infrastructure for a simple website.

Link to comment
Share on other sites

Link to post
Share on other sites

Just now, Mark77 said:

You'd need unique IP real-world IP addresses for them as well.  As I said, its way, way less hassle just to pay someone to do the DNS stuff than to try and run your own DNS infrastructure for a simple website.

I could pay people but its way more fun to do it myself and build some cool as shit

Current Build: CPU - AMD 5800K 4.2GHz w/ Stock Cooler :( | Motherboard - ASRock FM82A88 Extreme 4 Plus | Memory - Crucial 8GB Single Stick 1600MHz | GPU - AMD Radeon R7 260X 2GB | Storage - Seagate Barracuda 1TB 7200RPM

Project: Just let me play Black Ops... PLEASE!!! - https://uk.pcpartpicker.com/user/ion529/saved/#view=VKm9TW

Link to comment
Share on other sites

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×