LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 12-29-2019, 04:45 AM   #1
w4hyu2019
LQ Newbie
 
Registered: Dec 2019
Posts: 1

Rep: Reputation: Disabled
NameServer, Domain and SubDomain in 1 IP address


Dear all

I am new in linux please help

I have domain:

testing.com
Subdomain:

private.testing.com

mail.testing.com
ftp.testing.com
How to create local nameserver ns.testing.com also configure all it in one ip address ex. 10.20.30.40.
Debian 8

Thank you.
 
Old 12-29-2019, 05:06 AM   #2
berndbausch
LQ Addict
 
Registered: Nov 2013
Location: Tokyo
Distribution: Mostly Ubuntu and Centos
Posts: 6,316

Rep: Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002
The easiest way to create a local nameserver is adding all names to /etc/hosts, then run dnsmasq. dnsmasq will read /etc/hosts and use the mapping it finds there to respond to DNS requests.

Or you could install a full nameserver like BIND. That requires considerably more work and, most of all, a few days or weeks of learning, depending on your experience with DNS.

Last edited by berndbausch; 12-29-2019 at 06:42 AM. Reason: Added link to dnsmasq article
 
Old 01-04-2020, 09:14 PM   #3
ozstar
Member
 
Registered: Oct 2003
Location: Sydney OZ
Distribution: Ubuntu 20.04LTS, Zorin 16.2 Pro
Posts: 143

Rep: Reputation: 15
Hi,

This is my default host file


Quote:
127.0.0.1 localhost
127.0.1.1 david-HP-Compaq-6000-Pro-MT-PC

# The following lines are desirable for IPv6 capable hosts
::1 ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters

Would I just add our outside IP and the domain name of the site like so?


Quote:
127.0.0.1 localhost
127.0.1.1 david-HP-Compaq-6000-Pro-MT-PC
202.***.***.*** www.sitenumber1.com <<<<<<<<<<<<<<<<<<<<
202.***.***.*** www.sitenumber2.com <<<<<<<<<<<<<<<<<<<< same IP #

My Domain Registry said I need to do the below instructions to re-delegate the name to my office server, say sitenumber1.com. Does it look correct?

Quote:
Thank you for providing us a detailed explanation regarding your webserver.
Our domain level console allows customers to create their own name server records for gTLD (e.g. .com, .net) and Australian TLD (e.g. .com.au and all others) domain names.

Note: A customer's own name server must have previously been set up on a dedicated (static) IP address.

Step 1: Create a child name server (glue record):

Log in to the Admin Panel
Hover over 'Domains' and click 'Manage Domain'
Find the domain you want to edit and click on it
On the next page, click Domain Name
Click Zone Manager in the left menu
Click Domain Hosts (for .au domains) or Create and modify a server host name (for gTLD domains)
In the Create a Host section, type the Host name and the IP Address
Click [Create Host]

Domains can then be delegated to the new child name servers normally.

Please see: https://support.tppwholesale.com.au/art ... e-Records/
 
Old 01-05-2020, 12:00 AM   #4
ozstar
Member
 
Registered: Oct 2003
Location: Sydney OZ
Distribution: Ubuntu 20.04LTS, Zorin 16.2 Pro
Posts: 143

Rep: Reputation: 15
Setting up nameserver on office server/dom registry

Hi again,

It is a very confusing subject and years since I did anything like it. My main gig at the moment is website hosting on shared servers with WHM and Cpanel so much of what I am trying to do here is automatically done on these shared servers. I delegate and redelegate all the time for sites but the DNS is already setup on the shared server.

On looking at it, those instructions above from my Registry gives me a, 'child' dom name. For example one of the doms I have is say, example1.com, then this gives me... mysite.example.com.

If I am thinking correctly this is not what I want.

I want the name example.com to resolve on my server. My static IP# does now resolve there, but I need the actual dom name to as well.

In overview I want to have several domain names served from my on static IP

So to do this I think I need to do at least 2 things..

Put the name example.com into my hosts file and

Enter a nameserver address into the admin area of example.com in the Registry. Usually ns1 and ns2, ns3 etc.

This is where I get lost :-(

I own the name, 'myownofficeserver.com' and I want to use it as the nameserver for all other domains I host.

I don't know if I'm seeing it correctly but I see it as a sort of 'triangle'. myownofficeserver.com at the top and splitting into all other doms I host via the host file.

Does this make sense?

Shame I can't find a clear tutorial that explains it all from wo to go. I have seen many but they seem to say different things.

Gotta go get a coffee after that !
 
Old 01-05-2020, 01:25 AM   #5
scasey
LQ Veteran
 
Registered: Feb 2013
Location: Tucson, AZ, USA
Distribution: CentOS 7.9.2009
Posts: 5,717

Rep: Reputation: 2210Reputation: 2210Reputation: 2210Reputation: 2210Reputation: 2210Reputation: 2210Reputation: 2210Reputation: 2210Reputation: 2210Reputation: 2210Reputation: 2210
Per the RFCs, authoritative DNS requires at least two (preferably three) name servers on different netblocks (so, at least two IP addresses). I've decided that makes hosting my own name servers impractical. I use the registrar's name servers as the authoritative name servers for the domains I host (around 70) to fulfill that requirement. That's included in the price of the registration at the registrar I use (I believe that's usually the case...change registrars if it's not)

So, update the current authoritative name servers for your domain(s) so they use your static IP to get what you want.
 
  


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
Redirect Main domain and subdomain from http to https Navdeep.D2 Linux - Newbie 1 05-09-2017 04:33 AM
[SOLVED] htaccess remove www for subdomain and add www for main domain conflicker Programming 7 07-18-2012 06:23 PM
No Nameserver found - Nameserver (DNS) failure EPS Linux - Networking 10 01-14-2012 08:11 AM
Create webmail subdomain on Plesk master domain. (reserved subdomain) fruitwerks Linux - Server 0 08-11-2010 03:08 PM
Domain and subdomain macadam Linux - Newbie 2 09-18-2003 04:00 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

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

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
Open Source Consulting | Domain Registration