Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I have a DNS server as well as a Web server. I have many websites/domains on the Web server and would like to forward requests for these websites to the Web Server from the DNS server using Bind9.

A few things first: My domain name that will be used for the DNS server is currently used elsewhere, I want to make sure all the dns settings are correct and working before pointing the nameservers to the my DNS server.

My Websites are also being used elsewhere.

Say:

  • my ISP's Name Servers are 110.40.60.1 and 110.40.60.2
  • my DNS ip is 200.90.90.180 / 10.0.0.1 (External / Internal) named "Firewall"
  • my Web server is 10.0.0.80 (Internal) named "Spider"
  • my domain to be used for the DNS is www.myfirewall.com.au
  • my website to be hosted on the Web server is www.mywebsite.com.au

My resolv.conf file:

search myfirewall.com.au
search mywebsite.com.au

nameserver 110.40.60.1
nameserver 110.40.60.2

My named.conf.local file:

zone "myfirewall.com.au" {
    type master;
    file "/etc/bind/db.myfirewall.com.au";
};

zone "0.0.10.in-addr.arpa" {
    type master;
    notify no;
    file "/etc/bind/db.10";
};

My db.myfirewall.com.au file:

$TTL     3600
@        IN    SOA  firewall.myfirewall.com.au. root.myfirewall.com.au. (
                    166    ; Serial
                    3600   ; Refresh
                    3600   ; Retry
                    3600   ; Expire
                    3600   ; Negative Cache TTL
)
;
@        IN    NS   firewall.myfirewall.com.au.
firewall IN    A    10.0.0.1
www      IN    A    10.0.0.80

My db.10 file:

$TTL  3600
@     IN    SOA    firewall.myfirewall.com.au. root.myfirewall.com.au. (
                   166    ; Serial
                   3600   ; Refresh
                   3600   ; Retry
                   3600   ; Expire
                   3600   ; Negative Cache TTL
)
;
@     IN    NS     firewall.
1     IN    PTR    firewall.myfirewall.com.au
80    IN    PTR    spider.myfirewall.com.au

Are these setup correctly an how do I get requests for mywebsite.com.au to go to 10.0.0.80?

share|improve this question

migrated from stackoverflow.com May 23 '11 at 12:28

This question came from our site for professional and enthusiast programmers.

1 Answer 1

10.0.x.x is internal network address, it can't be rooted from outside (just like 192.168.x.x)

You'll have to use a NAT rule (network address transaltion) on your firewall/router to redirect all incoming request on port 80/423 to your server in DMZ. You can do this using iptables.

share|improve this answer
    
My external IP address is 200.90.90.180 this is what I will set the name server of www.mywebsite.com.au to. but I then want that to access the website on the Web server 10.0.0.80, I am not quite sure how to do this and it is hard to test as I don't know if I have to wait the hour for it to propagate. Basically for now I just want to be able to access the mywebsite.com.au that sits on 10.0.0.80 from an internal computer i.e 10.0.0.50 if it's dns is set to 10.0.0.1 instead of the mywebsite.com.au that is on the internet. –  Tokes May 23 '11 at 8:24

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.