LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 02-13-2020, 09:11 AM   #1
SomeITguy
LQ Newbie
 
Registered: Feb 2018
Posts: 18

Rep: Reputation: Disabled
Help: Want to host my own website and nameservers


Hi, I'm trying to host my own website and get it to work with my own nameservers. This is what I have so far:

-Website is up and running on a CentOS Cpanel VM
-Website already working with a public IP address
-domain name ownership
-Two CentOS 7 VMs for the nameservers
-Working NATs forwarded to the nameservers TCP/UDP 53

I installed BIND in nameservers and opened TCP/UDP 53 in their firewalls, but after a few tries I haven't been able to figure out the configuration to get my domain name working with them.

Any help will be greatly appreciated.
 
Old 02-13-2020, 09:39 AM   #2
smallpond
Senior Member
 
Registered: Feb 2011
Location: Massachusetts, USA
Distribution: CentOS 6 & 7
Posts: 3,270

Rep: Reputation: 893Reputation: 893Reputation: 893Reputation: 893Reputation: 893Reputation: 893Reputation: 893
If your domain is example.com, then the .com nameserver has to have an entry for your nameserver like:
Code:
example  NS   192.9.1.10    ; your nameserver IP
Then your nameserver can be authoritative for the example.com domain with entries like:

Code:
www      A    192.9.1.11    ; your website IP (could be the same IP)
Without that your nameserver is not in the DNS hierarchy. Do you have the domain hosting set up?
 
1 members found this post helpful.
Old 02-13-2020, 11:10 AM   #3
scasey
Senior Member
 
Registered: Feb 2013
Location: Tucson, AZ, USA
Distribution: CentOS 7.7.1908
Posts: 4,375

Rep: Reputation: 1540Reputation: 1540Reputation: 1540Reputation: 1540Reputation: 1540Reputation: 1540Reputation: 1540Reputation: 1540Reputation: 1540Reputation: 1540Reputation: 1540
In addition, the RFCs require at least two and preferably three name servers on different subnets for the authoritative name servers for a domain. I found that completely impractical to do myself, so I use the registrar's name servers as authoritative in most cases, and the hosting company's otherwise. Either are usually included in the cost of the service (domain registration or hosting).
 
1 members found this post helpful.
Old 02-13-2020, 02:32 PM   #4
SomeITguy
LQ Newbie
 
Registered: Feb 2018
Posts: 18

Original Poster
Rep: Reputation: Disabled
Hi again. Thank you, smallpond and scasey for trying to help.

I think I might be a little confused and hazy about some concepts, so let me go ahead and explain again my scenario and hopefully get you to shed some light on the issue:

-I have some CentOS VM running a website. Gave it a public IPv4 NAT and it works just fine.
-Purchased a domain name for it. Let's call it mysite.edu.co
-I'd like to set up my own nameservers so I can map mysite.edu.co to the public IP that is already working
-So I set up two additional CentOS VMs and installed BIND.
-For the nameservers I have other two NATs with public IPs forwarding TCP/UDP 53

And this is where I get lost. Do I need anything else? I mean, do I have to purchase another domain name for the nameservers themselves? So they would be like ns1.thenameservers.com and ns2.thenameservers.com


Again, thanks for helping me get this straight.
 
Old 02-14-2020, 11:44 AM   #5
smallpond
Senior Member
 
Registered: Feb 2011
Location: Massachusetts, USA
Distribution: CentOS 6 & 7
Posts: 3,270

Rep: Reputation: 893Reputation: 893Reputation: 893Reputation: 893Reputation: 893Reputation: 893Reputation: 893
Your nameservers can just be IP addresses, that's fine. Owning a domain name "mysite.edu.co" and putting it in your own nameservers is fine, but not enough. DNS is a tree starting at the root servers and working its way down. So I first ask the root server for the ".co" nameserver, ok, then I ask the .co nameserver for the .edu.co nameserver, ok, now I ask the .edu.co nameserver for the mysite.edu.co nameserver. Here's the disconnect. The edu.co nameserver doesn't know about your nameserver. Without paying someone to host your domain name, it isn't in the tree. As scasey said, it is unusual for individuals to run their own publicly facing nameserver. Much easier to have the reegistrar host it.
 
2 members found this post helpful.
Old 02-14-2020, 02:29 PM   #6
scasey
Senior Member
 
Registered: Feb 2013
Location: Tucson, AZ, USA
Distribution: CentOS 7.7.1908
Posts: 4,375

Rep: Reputation: 1540Reputation: 1540Reputation: 1540Reputation: 1540Reputation: 1540Reputation: 1540Reputation: 1540Reputation: 1540Reputation: 1540Reputation: 1540Reputation: 1540
Quote:
Originally Posted by SomeITguy View Post
Hi again. Thank you, smallpond and scasey for trying to help.

I think I might be a little confused and hazy about some concepts, so let me go ahead and explain again my scenario and hopefully get you to shed some light on the issue:

-I have some CentOS VM running a website. Gave it a public IPv4 NAT and it works just fine.
-Purchased a domain name for it. Let's call it mysite.edu.co
-I'd like to set up my own nameservers so I can map mysite.edu.co to the public IP that is already working
-So I set up two additional CentOS VMs and installed BIND.
-For the nameservers I have other two NATs with public IPs forwarding TCP/UDP 53

And this is where I get lost. Do I need anything else? I mean, do I have to purchase another domain name for the nameservers themselves? So they would be like ns1.thenameservers.com and ns2.thenameservers.com


Again, thanks for helping me get this straight.
You have to identify the name servers (which would be ns1.mysite.edu.co and ns2.mysite.edu.co*) at the registrar...that's where the relationship between the domain names and the IP addresses exists. The name servers associated with the domain name are "authoritative" because they are identified at the registrar.

*The ns* part of the subdomain can be anything you want, of course, or there can be no subdomain at all, except, again, one must have at least two more IP addresses, as above).

Again, the simplest thing to do is to use the registrar's name servers and not try to run your own. That service is probably included in the cost of the registration, but my Spanish is not sufficient to research at the .co registrar to confirm that.
Or, as smallpond said, you can pay someone to host your domain and use the hosting company's name server, but you'll then have to record that name server with the registrar.
 
2 members found this post helpful.
Old 02-14-2020, 02:41 PM   #7
SomeITguy
LQ Newbie
 
Registered: Feb 2018
Posts: 18

Original Poster
Rep: Reputation: Disabled
Talking

Thank you all for your help.

scasey: They offer very little options and support regarding nameservers, so I just paid for noip.com's nameserver service. us$30 a year is a very small price to free myself of this mess
 
Old 02-14-2020, 02:53 PM   #8
scasey
Senior Member
 
Registered: Feb 2013
Location: Tucson, AZ, USA
Distribution: CentOS 7.7.1908
Posts: 4,375

Rep: Reputation: 1540Reputation: 1540Reputation: 1540Reputation: 1540Reputation: 1540Reputation: 1540Reputation: 1540Reputation: 1540Reputation: 1540Reputation: 1540Reputation: 1540
Quote:
Originally Posted by SomeITguy View Post
Thank you all for your help.

scasey: They offer very little options and support regarding nameservers, so I just paid for noip.com's nameserver service. us$30 a year is a very small price to free myself of this mess
Ah. A good choice, and necessary if you're using dynamic IP addresses. You may mark the thread as SOLVED using the Thread Tools at the top of the page.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
LXer: How To Setup Linux Web Server And Host Website On Your Own Computer Part - 2 LXer Syndicated Linux News 0 07-19-2016 04:00 PM
LXer: How To Setup A Web Server And Host Website On Your Own Linux Computer? LXer Syndicated Linux News 0 07-16-2016 04:34 AM
Missing nameservers reported by your nameservers sushantchawla2005 Linux - Server 6 02-02-2011 08:50 AM
debian 4.0(apache 2.2)host my own website master Linux - Server 9 04-25-2007 02:14 PM
LXer: Being your own website host with Linux LXer Syndicated Linux News 4 04-17-2007 07:59 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 02:06 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration