Click to See Complete Forum and Search --> : need DNS help please


neotrace
06-09-2001, 04:34 AM
I’d like to host three sites. I'll be using redhat 7.1; I need to set up DNS, mail, and apache for the three domains? I've been attempting to figure out the mail part forever. I'd be worth trading some hardware, lol to get this working correctly! I have some linux experience, though i'm a newbie to DNS and mail!

freebsd
06-09-2001, 04:51 AM
>> I've been attempting to figure out the mail part forever

Mail takes much more time than the other two.

>> I'd be worth trading some hardware, lol

If you really are serious, are you still going to do some hardware trading in exchange for setting all 3 up?

>> I have some linux experience, though i'm a newbie to DNS and mail!

DNS+Mail+Apache could take up a whole book with 50,000 pages so be patient. If you need help on something particular, post your problems plus details here.

neotrace
06-09-2001, 05:22 AM
i'm serious, i'm able to set up apache w/no prob. for a single site. Though I want to take on hosting a site for myself and a few friends. So i'd like to setup the dns, mail, and multiple sites on my own box, using a single ip. If a single ip is out of the question than i could do it else where, where i'd have 4 ip's but less time to work on the machine, i'm serious about the hardware. A dpt scsi card, cable, and a few drives or an slot-one board and 266. I know it's not much but these books are becoming damn expensive and confusing!

Craig McPherson
06-09-2001, 11:05 AM
Mail is easy. Install exim, read through its default configuration file, make any changes you want. Done. If you want POP3 or IMAP, those are pretty easy also: install the dameons, configure them, set them up to run either standalone or from an inetd. I use solid-pop3d and I like it a lot.

What do you want to use DNS for? If you want the computers on your network to be able to look up each other, you can do that. If you want computers on the Internet to be able to look up computers on your network, you can't. Sorry.

You can do a combination of named-based virtual hosting and proxy passing if you want to run multiple web servers on your network, but it's best and fastest to do all your web serving from one machine. If you don't mind running webservers on non-standard ports, you could do port forwarding at your firewall as well.

Tell us what you want to do and we'll help you out.

Dagda
06-09-2001, 11:15 AM
you don't need to setup a dns server. There are a few companys on the net have have a free dns service. I can't remember the sites but I have seen them posted here before. just do a search for them. :)

Falcon
06-09-2001, 11:49 AM
Dyndns.org is good. They do both static and dynamic dns. For apache, you will need to set up <VirtualHost> directives. If I remember right you do that like this.

<VirtualHost YourIp>
ServerName pageyouarehosting.com
ServerAlias *.pageyouarehostin.com
ServerAdmin admin@hosting.com
DocumentRoot /dir/for/pages/
ErrorLog /error/log/file
</VirtualHost>

That will work if you get a nameserver to resolve to your IP. If they want their own .coms and not a dynsdns.org then you might have to run your own or pay someone else to.

What kind of mail system are you using? My favorite is not the one that came with RedHat. I can't remember what it is called but you install it (it has a grapical wizard) and you can do POP3, IMAP, SendMail, and WebMail. I can't remeber the name though (it will come to me).

Hope this helps,
Falcon

neotrace
06-09-2001, 03:17 PM
thanks for the info, i'd like to host my own DNS, because a. i know it possible, b. it'd give me more control over the domains. I'd like to setup the DNS part first, than the site, then mail. I will give any system specifics u need! I'm running pmfirewall with the dns, http, pop3, and smtp ports down.

Craig McPherson
06-09-2001, 03:38 PM
A domain has to have two different nameservers, meaning that if you want to host DNS for a domain yourself, you need two computers, and two IP addresses, and they both have to be 100% static and registered in the DNS database as nameservers.

Or you could use your own system as one of the nameservers for your domains (assuming your IP is 100% static), and then use a free DNS host like Granite Canyon for the other.

freebsd
06-10-2001, 06:44 AM
>> A domain has to have two different nameservers

According to RFC, YES. But NO technically.

>> and then use a free DNS host like Granite Canyon for the other

Not necessary.

Being a slave nameserver for particular domain is still not authoritative for that domain, master is. neotrace0 can run his own DNS server with master only. Yes, Registrar (i.e. Networksolutions) requires you to have at least TWO nameservers. Say you have 123.45.67.89 as your only static IP, you can simply enter 123.45.67.90 as the slave nameserver although that IP doesn't really belong to you or assigned to you by your ISP. But there is one thing you must configure in your named.conf, that is:

options {
...
allow-transfer { none; };
}

So that your master nameserver doesn't do any zone transfer to its slave nameserver (123.45.67.90).

neotrace
06-10-2001, 01:12 PM
i like the idea of using a single nameserver, though the granite idea isn't bad also. I ip is static and I have multiples, i'm using a single machine though?

freebsd
06-10-2001, 02:31 PM
>> I ip is static and I have multiples, i'm using a single machine though?

So do you have multiple static IPs? Build another box to act as a slave nameserver. The purpose of slave nameserver is to act as a backup to serve request. It's recommended to let someone else doing the slave for you (not within your class C network). It's also fine to run a slave on another box within your own network. Say Your master is down, not due to connection problem, your slave can still serve request, which is better than not having a slave at all. Why don't you throw $200 and build another box for slave? If you wanted to run a slave from the same box, then you better not runnning it as it's totally pointless. If your master is down, your slave probably will be down as well.

neotrace
06-10-2001, 03:51 PM
good idea, i'll find another box this week!

neotrace
06-10-2001, 11:02 PM
Would someone that has dns and apache setup on the same machine please send me their named.conf, zone file, and the apache config file w/virtual hosts setup. I'm not concerned about mail.

Craig McPherson
06-11-2001, 10:47 PM
Okay. This is an example based on my files. I actually have several different domains set up, but this is just a stripped-down example. Names have been changed to protect the guilty.

named.conf

options {
directory "/var/cache/bind";

forward only;

forwarders {
151.164.1.8;
151.164.1.7;
};

listen-on {
192.168/16;
127/8;
};

query-source address * port 53;

};

zone "." {
type hint;
file "/etc/bind/named.cache";
};

zone "example.org" {
type master;
file "/etc/bind/db.mydomain";
allow-query{
0.0.0.0/0;
};
};

zone "168.192.in-addr.arpa"{
type master;
file "/etc/bind/db.netrev";
allow-query{
0.0.0.0/0;
};
};


The hints file (mine is called named.cache, named.root is also common) should probably already exist. If not, you can get the latest version from ftp://ftp.rs.internic.net/domain/named.root

db.mydomain:

$TTL 86400

@ IN SOA example.org. root.example.org. (
200009010 ; serial
28800 ; refresh
3600 ; retry
604800 ; expire
86400 ) ; minimum

IN NS 192.168.1.1.
@ IN MX 10 192.168.1.1.
@ IN A 192.168.1.1

localhost IN CNAME @
www IN CNAME @
ftp IN CNAME @
mail IN CNAME @
news IN CNAME @
proxy IN CNAME @

paul IN A 192.168.1.2
sarah IN A 192.168.1.3
mary IN A 192.168.1.4
matthew IN A 192.168.1.5
mark IN A 192.168.1.6
luke IN A 192.168.1.7
john IN A 192.168.1.8


...


db.netrev:

$TTL 86400

@ IN SOA example.org. example.org. (
200006200 ; serial
28800 ; refresh
3600 ; retry
604800 ; expire
86400 ) ; default_ttl

IN NS 192.168.1.1.

1.1 IN PTR lamb.example.org.
2.1 IN PTR paul.example.org.
3.1 IN PTR sarah.example.org.

...



This is for BIND8, BTW. BIND9 might be different.

Hope that helps.

neotrace
06-12-2001, 12:12 AM
ok, i'm reinstalling, this weekend than i'll give those scripts a run! Thanks alot.

neotrace
03-21-2002, 04:01 PM
Ok, how would I setup the machines internally if they are given IP's through DHCP from the router/firewall? Meaning how would they be named in my db.netrev?