LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Fedora (https://www.linuxquestions.org/questions/fedora-35/)
-   -   Having trouble setting up DNS (https://www.linuxquestions.org/questions/fedora-35/having-trouble-setting-up-dns-183128/)

bsurfin 05-18-2004 11:34 PM

Having trouble setting up DNS
 
Last friday night ( 05/14/04 ) I purchased a domain name, over the weekend I purchased fedora, installed it and configured the DNS server according to fedora unleashed book. it is still not working, what should I do next?

ps. I have entered the ip address as the only one on my laptop with windows XP under the tcp/ip settings, and it gets me around the internet nice and fast. It just doesn't point to my webserver...

shubb 05-19-2004 11:34 AM

Ok, there is a lot of needed information here.

1. When you say that it is not working, what exactly is not working?
2. It sounds like you have set the Linux box as the only DNS server on your XP PC, and you can browse the Internet (by domain name I presume), so that means that the basic caching DNS server is working.
3. Can you paste the /etc/named.conf and the zone files to this forum?

bsurfin 05-19-2004 09:18 PM

Well I can type in http://tech-magic.net, or http://www.tech-magic.net and it will not pull up my site. But you are absoloutely correct by presuming that I can search the internet by domain name, using my own name server. As Far As #3 I'll do my best, please keep in mind I'm a Linux Newbie, I know very well how to do all this with With Microsoft Windows 2000 Advanced Server, but this GUI setup is quite a bit different than what I was doing with windows a couple years ago.

Here is my /etc/named.conf file:

// generated by named-bootconf.pl

options {
directory "/var/named";
/*
* If there is a firewall between you and nameservers you want
* to talk to, you might need to uncomment the query-source
* directive below. Previous versions of BIND always asked
* questions using port 53, but BIND 8.1 uses an unprivileged
* port by default.
*/
// query-source address * port 53;
};

//
// a caching only nameserver config
//
controls {
inet 127.0.0.1 allow { localhost; } keys { rndckey; };
};
zone "." IN {
type hint;
file "named.ca";
};

zone "localhost" IN {
type master;
file "localhost.zone";
allow-update { none; };
};

zone "0.0.127.in-addr.arpa" IN {
type master;
file "named.local";
allow-update { none; };
};

include "/etc/rndc.key";
~
~
1,1 All

And I haven't a clue where the zone files are.

Hope you can still help...

DigitalTygrrr 05-19-2004 10:21 PM

I think the easiest way is to edit by hand. I have a debian box for DNS, but I'm sure it will be almost the same as Fedora. (I run Fedora Core 1 as a desktop)

First, you need to create the zone file. I personally put mine in /etc/bind/zones ...but that's just me. (ie, /etc/bind/zones/linuxquestions.org) you can find all you need from http://www.isc.org/index.pl?/sw/bind/ . If you need further help, email me, and I'll work with you.

Next, go to the bottom of your named.conf and enter the zone information there. under the '// add entries for other zones below here' statement.

for example:

<code>

// add entries for other zones below here

zone "linuxquestions.org" {
type master;
file "/etc/bind/zones/linuxquestions.org";
};

</code>

Then save the file and restart named. (#/etc/init.d/bind restart)

You should now be able to 'ping' your server. If you do not get replies but the Domain still resolves to IP, that's probably OK. You probably have pings 'turned off'. If it does not resolve, go back and check for typos.

Hope this helps!

cw

edit: looked at your named.conf more closely.

put additional zones:

zone "0.0.127.in-addr.arpa" IN {
type master;
file "named.local";
allow-update { none; };
};
<-----------------------------------------------HERE !!
include "/etc/rndc.key";
~
~
1,1 All

also, it looks as though your zones are being kept in /var/named . To keep your zones with the others, you can put them in there. If you do decide to move them, make sure you use the full path.

Good Luck!

cw

bsurfin 05-19-2004 11:07 PM

Well the reason I bought Fedora Core 1 with the unleashed book, was to get away from slackware where nothing ever works, I figured it would be nice to go back to a nice GUI.
Is the GUI just not working ?

How could I tell?

DigitalTygrrr 05-19-2004 11:16 PM

Honestly, I've never tried the GUI. I'm not sure if it works or not, sorry. Perhaps someone else can shed some light on that. if you can't get it to work, there's always Webmin. That's a pretty easy way to understand what's going on under the hood while using a GUI.

If you're still having trouble after all of that, I can help you with commandline.

cw

bsurfin 05-19-2004 11:21 PM

Well I'll screw with it for a few more days, then if it still doesn't work, I'll be emailing you.

Thanks...

bsurfin 06-03-2004 12:20 AM

I just did a server install with Fedora Core 1, I've been trying to setup the bind nameserver for a month now without any luck. Basically I installed Fedora Core 1, downloaded root hints and created root.hints file in /var/named/ then I edited /etc/named.conf and was sure to include the full path name , then I created forward and reverse zones for my domain name in /var/named/ , in my /etc/resolv.conf file it just says:
search tech-magic.net
nameserver 64.91.63.93

my IP address of 64.91.63.93 is a static IP address.

then in my /etc/sysconfig/network file it says:
NETWORKING=yes
HOSTNAME=ns1.tech-magic.net
GATEWAY=192.168.1.1

And the ports are forwarded in my linksys router exactly the same as they were when I was running DNS on my crappy windows 2000 advanced server a couple years ago. I also tried DMZ hosting my computer and that doesn't help any either.

I am running bind, apache, mysql, sendmail, etc. Everything on one machine like I used to with windows.

I just have a sneaking suspition that it is something really stupid that I'm not doing. But I am doing all I know, and am finding in books, can anyone help ?
I'll even email someone copies of any of these files if that would help, just let me know if you want them in linux or windows format.

Linner 06-04-2004 05:59 AM

have you checked if bind are running in chrooted environment?..actually my bind configuration file are located on /var/named/chroot/ by default installation.

GufyMike 06-04-2004 06:27 AM

I got a question for you bsurfin.

I noticed you want it to point (the Domain NAme) to your Apache server.

In httpd.conf hace you entered the Server information.

# ServerName gives the name and port that the server uses to identify itself.
# This can often be determined automatically, but we recommend you specify
# it explicitly to prevent problems during startup.
#
# If this is not set to valid DNS name for your host, server-generated
# redirections will not work. See also the UseCanonicalName directive.
#
# If your host doesn't have a registered DNS name, enter its IP address here.
# You will have to access it by its address anyway, and this will make
# redirections work in a sensible way.
#
ServerName new.host.name:80

The new.host.name should be equal to your Domain Name.

aline 06-04-2004 07:02 PM

system-config-bind is your friend :-)
Or try djb-dns for a quick, painless DNS server.

bsurfin 06-05-2004 02:14 AM

I haven't gotten to the HTTP server yet, except to make sure that it is answering all requests on port #80. My Zones default in the /var/named/ directory...
I did register: tech-magic.net at domain monger, because they don't care if I only have one nameserver for right now.
Believe it or not, somehow I actually pretty much have this stuff working, after following yet another example I was given.

I can not go to http://tech-magic.net, or http://www.tech-magic.net but I can pull up the fedora page on my apache server by going to http://ns1.tech-magic.net

how can I remedy this ??? Here are my files, below:

/etc/resolv.conf
search tech-magic.net
nameserver 64.91.63.93




// Tech Magic's ns1 file /etc/named.conf

// generated by named-bootconf.pl

options {
directory "/var/named";
/*
* If there is a firewall between you and nameservers you want
* to talk to, you might need to uncomment the query-source
* directive below. Previous versions of BIND always asked
* questions using port 53, but BIND 8.1 uses an unprivileged
* port by default.
*/
query-source address * port 53;
};

//
//
controls {
inet 127.0.0.1 allow { localhost; } keys { rndckey; };
};
zone "." IN {
type hint;
file "named.ca";
};

zone "localhost" IN {
type master;
file "localhost.zone";
allow-update { none; };
};

zone "0.0.127.in-addr.arpa" IN {
type master;
file "named.local";
allow-update { none; };
};







; This file is: /var/named/tech-magic.zone


$ORIGIN tech-magic.net
$TTL 24h
@ IN SOA ns1.tech-magic.net. hostmaster.tech-magic.net. (
20040604-001 ;Serial#
5h ;Refresh (every 5 hours)
20m ;Refresh (every 20 mins)
4w ;Expire (every 28 days)
1h ) ;minimum TTL (1-hour)





IN NS ns1.tech-magic.net.

IN A 64.91.63.93

ns1 IN A 64.91.63.93

www IN CNAME ns1





; This file is: /var/named/tech-magic.rev


$ORIGIN 63.91.64.in-addr.arpa
$TTL 24h
@ IN SOA ns1.tech-magic.net. hostmaster.tech-magic.net. (
20040604-001 ;Serial#
5h ;Refresh (every 5 hours)
20m ;Refresh (every 20 mins)
4w ;Expire (every 28 days)
1h ) ;minimum TTL (1-hour)




IN NS ns1.tech-magic.net.

93 IN PTR www.tech-magic.net.


Any Help Is greatly appreciated...

aline 06-05-2004 04:54 AM

Please have a a cup of coffee and a look at:


https://www.redhat.com/docs/manuals/...e/ch-bind.html

https://www.redhat.com/docs/manuals/...-bindconf.html

http://www.tldp.org/HOWTO/DNS-HOWTO.html

Pete M 06-05-2004 06:50 AM

bsurfin

Not sure if this is what you are looking for but may help

Home DNS

I used this article to set up my local DNS server and still use my ISP DNS for surfing the net

One nice thing about the article is if you follow it to the letter it works

You may be able to modify it for your needs, I did modify it slightly so that now it resolves SMTP and POP3 so that now in Thunderbird I can enter for my mail servers as smtp.mydomain.com and pop3.mydomain.com which then accesses my Sendmail server perfectly

Pete

bsurfin 06-09-2004 07:56 PM

I just noticed,when I click on services, highlight named, then click restart, in the right lower window it says "rndc: connect failed: connection refused

is this normal, or is this why it won't work no matter what I Do?
I even restarted the machine, I configured it also to load at boot.

Any Ideas???


All times are GMT -5. The time now is 12:50 PM.