LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
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 07-20-2005, 04:09 AM   #1
steve007
Member
 
Registered: Jun 2005
Distribution: Fedora Core 3
Posts: 96

Rep: Reputation: 15
Announcing DNS Server


I am still stuck in setting up my DNS server, I have used webmin to do the settings but i dont know if it works or not. I run the command:
host -t ns my-example.org.uk 192.168.1.12

and it seemed to return no error (bearing in mind my-example.org.uk is not a real domain). But how do I get this DNS server out there on the internet? It has a private IP address... EVERY computer in our network is behind one router, the router has the ip address for the internet and all other machines are assigned an ip address by the router - this one on the dns server is static at 192.168.1.12. i understand that I need to register my DNS server with my registrar (UKReg) but how does it know its pointing to my DNS server? It doesnt ask me for an ip address at all, just asks for the name server. the actual domain seems to have an ip address of 213.171.192.xxx but can not be pinged (didnt think it wud anyway but at least its returned an IP address). What do I do to get my name server registered, ive typed in my name server with UKREG but it doesnt seem to be changing, and I am thinking I have not announced it to the internet somehow... but how do I do that?

I have used Webmin to set this DNS Server up, i made an A record, a Name server record, a CNAME alias record, and an MX record.

to view my previous thread about setting up the DNS server please clcik here:

http://www.linuxquestions.org/questi...hreadid=344274

Thank you for your help
 
Old 07-21-2005, 02:41 AM   #2
Michael Johnson
Member
 
Registered: Jul 2005
Location: Wagga Wagga, Australia
Posts: 262

Rep: Reputation: 30
You can't use privateaddresses on the internet. Your ISP and the internet will not accept your servers address of 192.168.12. The first point is to clarify what you want your DNS server to do.
Will be used on the internal network only?
Will your DNS server be resolving names for the internet? Is this being done by your router?
What services do you wish to offer people on the internet?
Would you be better of setting up a DMZ?
Does this server do DHCP server as well?
 
Old 07-21-2005, 10:01 AM   #3
steve007
Member
 
Registered: Jun 2005
Distribution: Fedora Core 3
Posts: 96

Original Poster
Rep: Reputation: 15
My DHCP is the router, that is what is used to assign IP addresses. I just want my DNS server to allow someone to be able to email us, I have created a name server record, an MX record, CNAME aliase and an A Record. I may also want it to resolve the url of our website though this is not for definate yet as we probably will host externally. For now I just want to be able to email someone on our domain name...
firstname.lastname@my-example.org.uk
I am able to send emails OUT, but not recieve records in. I have set on the router to map requests for port 53 to point to 192.168.1.12 and I have placed the nameserver with IP address on our domain registrar. But I can not receive emails, I am missing something, probably something really small and I dont know what it is. As stated earlier I used Webmin to set up the DNS, I also used it to set up Postfix, I have apache server running and can access squirrelmail, I have dovecot running..... so what am i missing?

Steve
 
Old 07-21-2005, 10:13 AM   #4
phil.d.g
Senior Member
 
Registered: Oct 2004
Posts: 1,272

Rep: Reputation: 154Reputation: 154
Have you forwarded port 25 from your router to your server.

Use http://192.220.90.71/cgi-bin/DoDig to check your DNS server is working correctly and that your DNS server has been successfully registered
 
Old 07-21-2005, 10:16 AM   #5
steve007
Member
 
Registered: Jun 2005
Distribution: Fedora Core 3
Posts: 96

Original Poster
Rep: Reputation: 15
why port 25? what is port 25 for? i thought port 53 was for DNS
 
Old 07-21-2005, 10:17 AM   #6
phil.d.g
Senior Member
 
Registered: Oct 2004
Posts: 1,272

Rep: Reputation: 154Reputation: 154
smtp, its when email is relayed to your server it connects to your smtp server, in your case I think you said postfix, which listens on port 25
 
Old 07-21-2005, 10:21 AM   #7
steve007
Member
 
Registered: Jun 2005
Distribution: Fedora Core 3
Posts: 96

Original Poster
Rep: Reputation: 15
that link you gave me returned an answer.... i typed in my name server, for example ns1.my-example.org.uk and it said it found one server....... but if i type anything in there like ns1.sjdfdshhsd.co.uk is says it finds a name server.........?
 
Old 07-21-2005, 10:26 AM   #8
steve007
Member
 
Registered: Jun 2005
Distribution: Fedora Core 3
Posts: 96

Original Poster
Rep: Reputation: 15
hmmm i added another rule to my router to forward port 25 to that same ip address as well but it didnt seem to make any difference, i try and send an email from my hotmail account and it fails, i get a postmaster comming back saying its not recognised email address...... are u able to email me and chat via email or instant messaging.... u seem pretty smart.....
 
Old 07-21-2005, 10:29 AM   #9
phil.d.g
Senior Member
 
Registered: Oct 2004
Posts: 1,272

Rep: Reputation: 154Reputation: 154
On that dns query page put ns1.your-example.com as the nameserver, put your-example.com as the domain and change the query type to MX, if you don't understand the output just paste it here.

You should get something along these lines:
Code:
;; QUESTIONS:
;; linuxquestions.org, type = MX, class = IN
;; ANSWERS:
linuxquestions.org. 	14400 	MX 	10 mail.linuxquestions.org.	
linuxquestions.org. 	14400 	MX 	15 mx.linuxquestions.org.	
linuxquestions.org. 	14400 	MX 	20 mx1.linuxquestions.org.	
;; AUTHORITY RECORDS:
linuxquestions.org. 	14400 	NS 	ns1.linuxquestions.net.	
linuxquestions.org. 	14400 	NS 	ns1.linuxquestions.org.	
linuxquestions.org. 	14400 	NS 	ns2.linuxquestions.org.	
;; ADDITIONAL RECORDS:
mail.linuxquestions.org. 	 14400   A 	64.179.4.149	
mx.linuxquestions.org.          14400   A 	207.44.182.114	
mx1.linuxquestions.org.        14400   A 	209.152.163.17
That will tell us that your name server is set up correctly or not, either way we will start to close in on the problem
 
Old 07-21-2005, 10:34 AM   #10
steve007
Member
 
Registered: Jun 2005
Distribution: Fedora Core 3
Posts: 96

Original Poster
Rep: Reputation: 15
right well i get nothing like it.......

; (1 server found)
;; res options: init recurs defnam dnsrch
;; got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 10
;; flags: qr rd ra; Ques: 1, Ans: 3, Auth: 3, Addit: 3
;; QUESTIONS:
;; menandmice.com, type = MX, class = IN

;; ANSWERS:
menandmice.com. 64632 MX 30 vx-t.itn.is.
menandmice.com. 64632 MX 10 mail.menandmice.is.
menandmice.com. 64632 MX 20 vx-m.itn.is.

;; AUTHORITY RECORDS:
menandmice.com. 39885 NS dns1.menandmice.com.
menandmice.com. 39885 NS ns1.secure.net.
menandmice.com. 39885 NS ns2.secure.net.

;; ADDITIONAL RECORDS:
ns1.secure.net. 99611 A 192.220.124.10
ns2.secure.net. 99611 A 192.220.125.10
dns1.menandmice.com. 45008 A 217.151.171.7

;; Total query time: 0 msec
;; FROM: us.mirror.menandmice.com to SERVER: default -- 0.0.0.0
;; WHEN: Thu Jul 21 09:33:01 2005
;; MSG SIZE sent: 32 rcvd: 225


at a guess it means my DNS dont exist or dont have an MX record or something??? i dunno.... any chance we can instant message at all for faster responses.... i havent been too lucky on this forum getting good or prompt replies
 
Old 07-21-2005, 10:46 AM   #11
phil.d.g
Senior Member
 
Registered: Oct 2004
Posts: 1,272

Rep: Reputation: 154Reputation: 154
Not really into im, sorry.

I get the response you gave if you leave the domain name box empty, something must have gone wrong, post your domain here, or mail it me if you don't want it publicly viewable, you'll find my email address at the bottom of the webpage at the www link at the bottom of my post
 
Old 07-22-2005, 03:12 AM   #12
steve007
Member
 
Registered: Jun 2005
Distribution: Fedora Core 3
Posts: 96

Original Poster
Rep: Reputation: 15
Ok, thanks for the reply. but no, the IP address you gave me doesnt seem to be our internet ip address. on the router "internet ip address" reads a completley different IP. the IP you mentioned seems to be something that UKReg has given to the domain i think.... if you ping that org.uk domain you will find its similar to the one you gave me, also if you ping ns1.fast-hosts.org its the same IP, but you cant ping my ns1 server.... it says its unreachable. How do I check that port 25 is open on my server anyways? How can I check that a particular port is open.... is there a way I can ping the server and the port?

Thanks

Steve
 
Old 07-22-2005, 03:37 AM   #13
steve007
Member
 
Registered: Jun 2005
Distribution: Fedora Core 3
Posts: 96

Original Poster
Rep: Reputation: 15
ok, i have just typed in the netstat command on my dns server (which also hosts the email server at the moment for testing) and this is what i got:
Code:
[root@sbcdc1 ~]# netstat -an --inet
Active Internet connections (servers and established)
Proto Recv-Q Send-Q Local Address               Foreign Address             State
tcp        0      0 0.0.0.0:1025                0.0.0.0:*                   LISTEN
tcp        0      0 0.0.0.0:139                 0.0.0.0:*                   LISTEN
tcp        0      0 0.0.0.0:5900                0.0.0.0:*                   LISTEN
tcp        0      0 0.0.0.0:111                 0.0.0.0:*                   LISTEN
tcp        0      0 0.0.0.0:10000               0.0.0.0:*                   LISTEN
tcp        0      0 192.168.1.12:53             0.0.0.0:*                   LISTEN
tcp        0      0 127.0.0.1:53                0.0.0.0:*                   LISTEN
tcp        0      0 127.0.0.1:631               0.0.0.0:*                   LISTEN
tcp        0      0 127.0.0.1:5335              0.0.0.0:*                   LISTEN
tcp        0      0 127.0.0.1:25                0.0.0.0:*                   LISTEN
tcp        0      0 127.0.0.1:953               0.0.0.0:*                   LISTEN
tcp        0      0 0.0.0.0:445                 0.0.0.0:*                   LISTEN
tcp       10      0 192.168.1.12:5900           192.168.1.20:1526           ESTABLISHED
udp        0      0 0.0.0.0:1024            0.0.0.0:*
udp        0      0 0.0.0.0:1025            0.0.0.0:*
udp        0      0 192.168.1.12:137        0.0.0.0:*
udp        0      0 0.0.0.0:137             0.0.0.0:*
udp        0      0 192.168.1.12:138        0.0.0.0:*
udp        0      0 0.0.0.0:138             0.0.0.0:*
udp        0      0 0.0.0.0:10000           0.0.0.0:*
udp        0      0 192.168.1.12:53         0.0.0.0:*
udp        0      0 127.0.0.1:53            0.0.0.0:*
udp        0      0 0.0.0.0:68              0.0.0.0:*
udp        0      0 0.0.0.0:843             0.0.0.0:*
udp        0      0 0.0.0.0:5353            0.0.0.0:*
udp        0      0 0.0.0.0:111             0.0.0.0:*
udp        0      0 0.0.0.0:631             0.0.0.0:*
as far as i can tell that means port 25 adn 53 are open being listened on right? port 53 is listed on both the top section and the bottom section, should port 25 be listed on the udp section as well or is it fine the way it is?

steve
 
Old 07-22-2005, 04:39 AM   #14
phil.d.g
Senior Member
 
Registered: Oct 2004
Posts: 1,272

Rep: Reputation: 154Reputation: 154
smtp only listens on the the tcp protocol, dns listens on both but udp is preferred iirc.

What you need to do next can seem a bit confusing.

goto your ISPs control panel and create name servers for your domain. They should provide this functionality, if not email them, note this is not the same as changing the name servers for your domain.

You need to create a namerserver ie ns1.your-domain.com and use the IP of your router. Then create another one ie ns2.your-domain.com and use the IP of your secondary DNS server, the secondary DNS server can not be the same as the primary. If you do not have a secondary DNS server there are a few websites that provide this service.

Once your name servers have been registered then you need to change the name server that your domain uses, at the minute your domain registrars DNS servers to your newly created name servers. Now you may have up to a 48 hour wait for the changes to take effect.

Then once that is done that should be it

-----------------------------------------------------------

When I did the DNS lookups before it did them on your domains registrar so proved nothing really - I assumed you had allready registered the name servers and changed your domain over to them.

I have done some checks on the IP you gave me that was for your router.

A reverse DNS query gives dialxxx-xxx-xxx-xxx.in-addr.btopenworld.com so that means your using a broadband connection to connect your computer to the internet. Is it a static IP, if it changes every time you connect to the internet then you either need to ask BT for a static IP or call it a day with this project. A static IP is a absolute *must*

I have tried pinging your routers IP and it gave no response, so theres three possibilities - you have your computer/router turned off, your router won't return pings or your router has been reconnected and been given a new IP.

Well nmap gives:

Code:
philip@newcastle:~$ nmap -P0 xxx.xxx.xxx.xxx

Starting nmap 3.75 ( http://www.insecure.org/nmap/ ) at 2005-07-22 10:19 BST
Interesting ports on dialxxx-xxx-xxx-xxx.in-addr.btopenworld.com (xxx.xxx.xxx.xxx):
(The 1661 ports scanned but not shown below are in state: filtered)
PORT   STATE  SERVICE
25/tcp closed smtp
53/tcp open   domain

Nmap run completed -- 1 IP address (1 host up) scanned in 501.377 seconds
When I queried your IP for the domain it returned no result, so your DNS server is configured wrongly. I have had no experience with BIND, I did this same project years ago and I used a little DNS server that only served records, no caching or fetching from other servers, etc it was called nsd (name server daemon). So you will have to see someone else about BIND.

smtp is closed, I can only assume you didn't have it running at the time I ran the test or you have it configured to allow no relaying. You need to allow relaying from foreign to local, local to local and local to foreign, but not foreign to foreign.

Don't register the name servers and change your domains name servers until you have the DNS working correctly or your domain will stop working. You should be able to test your own DNS server by `dig @localhost your-domain.com`

I think that should keep you going for a bit, any more questions just ask here and I'll do my best
 
Old 07-22-2005, 05:31 AM   #15
steve007
Member
 
Registered: Jun 2005
Distribution: Fedora Core 3
Posts: 96

Original Poster
Rep: Reputation: 15
ok, first of all I did not register a name server with BTOpenworld... i guess im missing that part..

I dont have a second nameserver.... is it ok to use the ns1.fast-hosts.org or should I create another? Can this be on the same physical machine as my current DNS server as a separate name server record or shud it be a separate machine? if its a second machine then if i map my router to route to that dns server as well, how does it know which one to send requests to? first in the list??

I am fully aware that a static IP is a must, but currently on a dynamic one... the reason I havent got a static Ip address yet is because the router connects to the net and it hasn't re-dialed for months so its kept the same IP number... I wil get a static one once DNS is set up and working, its still ok to use this ip address for testing purposes isnt it... it keeps it for a long time because we on broadband, connection dont drop.

from the results i posted here about the ports..... did that show that port 25 was open or closed... it said listening... if its closed how do i open it?

I think port 25 must be closed, since i use postfix and it looks quite plain and simple to show about relaying....

Thanks for this help on this.
 
  


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
dns client cannot resolve on dns server jtvillegas Linux - Software 3 03-12-2016 03:30 PM
help needed to setup a DNS server can anyone say how to configure a DNS server subha Linux - Networking 4 04-27-2012 11:50 PM
How the DNS-server is connected to work of a web-server and a mail-server? ukrainet Linux - Newbie 2 01-10-2005 09:18 PM
Do I leave primary and seconday DNS blank for a DNS Server? imsam Linux - Networking 3 10-25-2004 01:48 PM
need help to set up caching only dns server to with bogus DNS entries ullas Linux - Networking 1 10-28-2003 01:54 PM

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

All times are GMT -5. The time now is 06:24 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
Open Source Consulting | Domain Registration