LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 06-27-2013, 05:34 PM   #1
khronosschoty
Member
 
Registered: Jul 2008
Distribution: Slackware
Posts: 648
Blog Entries: 2

Rep: Reputation: 514Reputation: 514Reputation: 514Reputation: 514Reputation: 514Reputation: 514
DNS


Okay I have a working server up and going and a IP that works and can be accessed. I also have a registered Domain name. What is the easiest way link my IP and my Domain name together. I am somewhat lost.
 
Old 06-27-2013, 08:01 PM   #2
Z038
Member
 
Registered: Jan 2006
Location: Dallas
Distribution: Slackware
Posts: 910

Rep: Reputation: 174Reputation: 174
Usually, your domain name registrar will have DNS servers that you can use. They typically provide you some mechanism through your account with them that lets you define DNS records for your domain. If you have your domain hosted with some hosting provider, they will usually have nameservers you can use also.

Another option is to run your own nameserver. This gives you the most control over your DNS records, but it requires some effort to set up and maintain. It's not trivial if you've never done it before.

If your IP address is dynamic, you'll need a dynamic DNS updater like ddclient to keep your DNS records updated as your IP address changes.
 
Old 06-27-2013, 09:44 PM   #3
khronosschoty
Member
 
Registered: Jul 2008
Distribution: Slackware
Posts: 648

Original Poster
Blog Entries: 2

Rep: Reputation: 514Reputation: 514Reputation: 514Reputation: 514Reputation: 514Reputation: 514
Okay. Thank you for the reply. I am trying to set up a DNS server. I have a public IP that I am able to access my machine from. This IP is static. While I am going through all the guides to help me set up the DNS I notice that all the example IPs are smaller then mine, leading me to believe they must be speaking about some other kind of IP or something.

Example: IP 192.168.0

IP I am working with 172.245.212.18

Example I am referring to

Quote:
Originally Posted by [url
http://comtech247.net/2012/09/17/how-to-set-up-a-dns-server-on-debian-6-0-squeeze/]sudo[/url] nano /etc/bind/named.conf.local

I have used nano to open up the file but use whichever text editor you are happy with. Insert the following code into the file:

——————————————————————————————————————————–

# This is the zone definition. replace example.com with your domain name
zone “comtech.com” {
type master;
file “/etc/bind/zones/comtech.com.db”;
};

# This is the zone definition for reverse DNS. replace 0.168.192 with your network address in reverse notation – e.g my network address is 192.168.0
zone “1.168.192.in-addr.arpa” {
type master;
file “/etc/bind/zones/rev.0.168.192.in-addr.arpa”;
};
 
Old 06-28-2013, 01:15 AM   #4
Z038
Member
 
Registered: Jan 2006
Location: Dallas
Distribution: Slackware
Posts: 910

Rep: Reputation: 174Reputation: 174
There are several different types of name servers. The example you reference is setting up a forwarding name server for a 24-bit non-routable private network with up to 253 hosts, a LAN. It could also resolve local host DNS names to any of the hosts on that private network, but not from the internet, because 192.168.x.x is non-routable.

It sounds like you want to set up an authoritative name server for your domain, accessible from the internet. By the way, you must have a minimum of two name servers to do that, and they have to be at different IP addresses. So you'll need two public IP addresses at the minimum to set up your own authoritative public name server. See IANA Technical requirements for authoritative name servers.

I'm not a network expert, so this is a layman's explanation, but I hope it'll help shed some light.

An IPV4 IP address consists four octets of eight bits each for a total of 32 bits. There is a network-identifying prefix followed by a host identifier within that network. The number of bits that comprise the network portion and the host portion varies, but in the example IP, 192.168.0, it is a 24-bit network address. You can tell because the first three octets (24 bits) are specified. It could also be written as 192.168.0.0/24, although not for a name server zone file definition.

The 8 bit host portion (last octet) isn't specified in the name server reverse pointer zone definition in the example because the zone applies to all of the 256 possible host-ids, i.e., 192.168.0.0, 192.168.0.1, ..., 192.168.0.255. (Strictly speaking, the 0 and the 255 values in this 24-bit network cannot be host-ids. The first address in a subnet is called the network identifier, 192.168.0.0 in this case, and the last is the broadcast address, 192.168.0.255 in this case, and neither one identifies a host. But that is not an important distinction in the context of a name server zone file definition.)

You have a single public IP address consisting of 32 bits that your ISP assigned to you, and you presumably want to run one or more internet-accessible servers there. I'll assume for this discussion that its a web server, so as to distinguish it from your name server.

As far as the internet is concerned, your IP appears as a single host. For purposes of name server zone file definition, you can think of it as a 32 bit network address with no host-id, which you could represent in CIDR notation as 172.245.212.18/32. You might have a single system at that address directly connected to the internet where you run the internet-accessible web server that you want your name server to resolve URLs to, or you might have a gateway/router system or appliance at that address with a class A, B, or C non-internet-routable private network behind it, and your web server could be on a host on that private network. But all the internet is going to see is your single 32-bit IP address, 172.245.212.18, so if you want to set up a name server to respond to queries about your registered domain name, that is the address you must use in your zone files. If your web server actually resides on a private network host, then your gateway/router system will do network address translation (NAT), but the outside world won't know that.



Bottom line, yes, your reverse pointer zone file will be 18.212.245.172.in-addr.arpa.

You should find a different example to work from, since you aren't setting up the same type of name server as in that example.
 
2 members found this post helpful.
Old 06-28-2013, 11:11 AM   #5
khronosschoty
Member
 
Registered: Jul 2008
Distribution: Slackware
Posts: 648

Original Poster
Blog Entries: 2

Rep: Reputation: 514Reputation: 514Reputation: 514Reputation: 514Reputation: 514Reputation: 514
Quote:
Originally Posted by https://www.iana.org/procedures/nameserver-requirements.html

Network diversity
2.5.1 The name servers must be in at least two topologically separate networks.

2.5.2 A network is defined as an origin autonomous system in the BGP routing table.

2.5.3 The requirement is assessed through inspection of views of the BGP routing table.
So does this mean that I must have two separate servers running, to have a name server?

How can I get www.example.com to point to my webpage? I also am trying to get www.example.com:6697 to point to a znc server I am running. I have a domain name from registered by and with godaddy. I can point the domain name to a name server (I am guessing I have to host the name server?) they mentioned to me something about how they can run the name server but I still need to have the zone file? What is the best way to go about this, thanks.
 
Old 06-28-2013, 02:02 PM   #6
Z038
Member
 
Registered: Jan 2006
Location: Dallas
Distribution: Slackware
Posts: 910

Rep: Reputation: 174Reputation: 174
Quote:
Originally Posted by empcrono View Post
So does this mean that I must have two separate servers running, to have a name server?
I don't know if it is universally enforced, but if you only have one name server, and the system it runs on is down, how will anyone find your site? That is why you need at least two.

Quote:
Originally Posted by empcrono View Post
How can I get www.example.com to point to my webpage? I also am trying to get www.example.com:6697 to point to a znc server I am running. I have a domain name from registered by and with godaddy. I can point the domain name to a name server (I am guessing I have to host the name server?) they mentioned to me something about how they can run the name server but I still need to have the zone file? What is the best way to go about this, thanks.
I would venture that most people who have a simple web site or two hosted with a hosting company do not host their own name servers. They use the name servers that their registrar or their hosting company typically make available to them. It sounds like you are going to host your web and znc server on your own system, rather than with a hosting provider. Even so, you should be able to use godaddy's name servers to point your domain to your IP address.

I have no experience with godaddy, but their support topic on Managing your DNS says that you can use the Zone File Editor in their DNS Manager to add, edit, and delete zone file records for your domain names registered with them, or registered elsewhere and hosted with them. This is what I suggest you do. It'll be a panel driven interface, so you should be able to enter a hostname and an IP address (an A record) in their zone file editor. For a web server, usually www as the host name and your IP address as the A record. You might also define a host name for your znc server, and you could define an @ and a * entry too. The @ covers the case where someone omits the hostname and just specifies your domain name, e.g., http://example.com. The * is a wild card that matches any host name that you haven't already defined.

Another godaddy support page on Registering Your Own Nameservers/Hosts explains how to register your own name servers. It looks like they do require you to enter two unique IP addresses. So if you don't want to use godaddy's name servers, then you'll need another unique IP address and a system to run the second name server on.

You can also purchase DNS services for your domain without transferring your registration. For example, dyn.com offers such services.
 
1 members found this post helpful.
Old 06-28-2013, 06:15 PM   #7
Z038
Member
 
Registered: Jan 2006
Location: Dallas
Distribution: Slackware
Posts: 910

Rep: Reputation: 174Reputation: 174
After doing a bit more research, I'm sure that you are going to need a minimum of two static IP addresses to run your own public DNS server.

Also, I believe your ISP controls the reverse map and will have to handle the reverse PTR zone entries for you.

Last edited by Z038; 06-28-2013 at 07:24 PM.
 
1 members found this post helpful.
Old 07-02-2013, 09:12 AM   #8
khronosschoty
Member
 
Registered: Jul 2008
Distribution: Slackware
Posts: 648

Original Poster
Blog Entries: 2

Rep: Reputation: 514Reputation: 514Reputation: 514Reputation: 514Reputation: 514Reputation: 514
hello everyone. Some day I want to get my own name server set up but for now I am using a registrar to handle the name zone etc. I thought this would slove my issues. I have looked up and down the web. I have used differnt registrars and I am still stumped. I have checked with just about every group I am working with. Here is my issue. I am trying to connect to a IRC bouncer known as znc. When I connect using my IP it works no issues. When I Try to connect to it using my domain name it will not connect. I have been told that all I need to do is creat "A" host, and I have done this. One time I connected to it with my domian name and it seemed liked everything was going to work good. however today, after making no changes, I once again cannot connect to the bouncer using my domain name. I am desperate for any kind of help! I have exhausted everything short of becoming the PHD expert in all things concerning domain names etc. I am sure there is something else to know, but, I cannot think it.

Last edited by khronosschoty; 07-02-2013 at 09:15 AM.
 
Old 07-02-2013, 11:37 AM   #9
Z038
Member
 
Registered: Jan 2006
Location: Dallas
Distribution: Slackware
Posts: 910

Rep: Reputation: 174Reputation: 174
You can use this site to look up the DNS resource records that are defined for your domain:

http://dns-record-viewer.online-doma...l-form-submit/

For example, put in your domain name without a host name, like colorcrossing.com, and leave the query type set to ANY, and you'll see all the records currently defined, except for CNAMEs. Put in your host.domainname in the host/IP address field and it will list a CNAME record for it if one exists.

There are numerous similar sites like the above on the web. You can also use the dig command from a command line.

You would need either an A record to relate each host name you define to your IP address, or a CNAME record to relate a host name alias to an A record or to your domain name.

I see that www.colorcrossing.com is a CNAME related to colorcrossing.com. Check whatever host name you are using for your znc bouncer and see if it is defined as either an A record pointing to your IP address, or a CNAME pointing to your domain name.
 
1 members found this post helpful.
Old 07-02-2013, 12:38 PM   #10
Z038
Member
 
Registered: Jan 2006
Location: Dallas
Distribution: Slackware
Posts: 910

Rep: Reputation: 174Reputation: 174
Here is an even better site to validate your dns results. http://www.dnsinspect.com

Using dig, the results returned for colorcrossing.com don't match the reverse pointer results for 172.245.212.18.

Code:
# dig colorcrossing.com      

; <<>> DiG 9.9.2-P2 <<>> colorcrossing.com
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 19272
;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 2, ADDITIONAL: 3

;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 4096
;; QUESTION SECTION:
;colorcrossing.com.             IN      A

;; ANSWER SECTION:
colorcrossing.com.      1800    IN      A       23.30.246.74

;; AUTHORITY SECTION:
colorcrossing.com.      1279    IN      NS      ns52.domaincontrol.com.
colorcrossing.com.      1279    IN      NS      ns51.domaincontrol.com.

;; ADDITIONAL SECTION:
ns51.domaincontrol.com. 6713    IN      A       216.69.185.26
ns52.domaincontrol.com. 6713    IN      A       208.109.255.26
Code:
# dig -x 172.245.212.18

; <<>> DiG 9.9.2-P2 <<>> -x 172.245.212.18
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 9501
;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 2, ADDITIONAL: 3

;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 4096
;; QUESTION SECTION:
;18.212.245.172.in-addr.arpa.   IN      PTR

;; ANSWER SECTION:
18.212.245.172.in-addr.arpa. 83815 IN   PTR     host.colocrossing.com.

;; AUTHORITY SECTION:
245.172.in-addr.arpa.   83814   IN      NS      NS1.colocrossing.com.
245.172.in-addr.arpa.   83814   IN      NS      NS2.colocrossing.com.

;; ADDITIONAL SECTION:
NS1.colocrossing.com.   11815   IN      A       198.46.128.18
NS2.colocrossing.com.   11815   IN      A       198.46.128.18
Are you currently being hosted by a service provider, and in the process of setting up to self-host at your dedicated IP address?

I think you need to enter the A record for your znc server at the DNS server that is authoritative for your domain name. Just point the host name to your IP address. Once you move your site, you can define all the required DNS resources with the new DNS provider.

Last edited by Z038; 07-02-2013 at 12:39 PM.
 
1 members found this post helpful.
  


Reply



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 local DNS query to remote DNS server on non standard port? rock_ya_baby Linux - Server 8 04-13-2010 04:31 AM
how to configure master dns in windows2003 server and its slave dns in rhel5 suneellinux Linux - Newbie 1 04-11-2008 05:13 PM
i want make DNS server on fedora 8 opreting system plz tell me what is file use DNS nitin gupta Linux - Newbie 2 02-20-2008 05:01 PM
Win2k3 DNS + PFsense DNS Forwarder = No internal DNS resolution Panopticon Linux - Networking 1 11-19-2007 09:59 PM
TEMP_FAILURE: DNS Error: Timeout while contacting DNS servers when receiving emails tonysutherland Linux - Networking 2 02-10-2006 09:04 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 11:17 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