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 12-13-2006, 10:58 PM   #1
titel
Member
 
Registered: Feb 2006
Posts: 36

Rep: Reputation: 15
Question DNS, web and mail server on the same linux box


Hi everybody,

I want to host my web and mail server on my FC 6 linux server. My domain registar asked me for 2 DNS servers in order to be able to register an domain. The problem is that my ISP only provided me one DNS server.

My question is, is it possible to run the DNS, web and mail server on the same linux box, with only one fixed IP? In BIND's zones configuration what should be the name of the DNS server that I'm running and should I specify the same IP / server name for the web and mail server?

Thank you in advanced for your answer,
titel
 
Old 12-14-2006, 02:30 AM   #2
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,163
Blog Entries: 1

Rep: Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032
Quote:
My question is, is it possible to run the DNS, web and mail server on the same linux box, with only one fixed IP?
Absolutely. Just use something like that in your zone file:
Code:
IN      NS      yourdns.domain.com.
IN      NS      your-isp-dns.isp.com
IN      MX      10 mail.domain.com.
yourdns IN A xx.xx.xx.xx
www     IN A xx.xx.xx.xx
mail       IN A xx.xx.xx.xx
Note that the ip of your mail server must resolve to it's name, so in the reverse zone use:
Code:
xx.xx.xx.xx IN PTR mail
 
Old 12-15-2006, 04:51 AM   #3
titel
Member
 
Registered: Feb 2006
Posts: 36

Original Poster
Rep: Reputation: 15
So, this also means that I could be hosting several subdomains on the same machine as well, right?

What would the zones files look like in this case. And further more, what other things have to me changed in order to hava apache serve different content for different subdomains?

titel
 
Old 12-15-2006, 05:25 AM   #4
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,163
Blog Entries: 1

Rep: Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032
Quote:
So, this also means that I could be hosting several subdomains on the same machine as well, right?
Yes. The zone file for your domain should look like this (you can use either A or CNAME):
Code:
IN      NS      yourdns.domain.com.
IN      NS      your-isp-dns.isp.com
IN      MX      10 mail.domain.com.
yourdns IN A xx.xx.xx.xx
www     IN A xx.xx.xx.xx
mail       IN A xx.xx.xx.xx
sub1     IN A xx.xx.xx.xx
sub2     IN CNAME sub1
As for apache you should read the apache documentation about vhosts for apache 1.3 or apache 2
 
  


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
sharing user information / authentication across DNS / Mail / Web server vasanthi Linux - General 1 10-18-2006 06:39 AM
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
can we configure a Linux server with mail server,file server and web server kumarx Linux - Newbie 5 09-09-2004 06:21 AM
Setup DNS, WEB, FTP, and Mail Server Help! dcdjservices Linux - Networking 42 08-28-2003 03:57 PM
Setup a linux server, DNS, WEB, FTP, and Mail Server Help watermelon_lee Linux - Networking 1 08-26-2003 03:09 AM

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

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