Hi. I'm new to DNS and bind. My ISP doesn't support local loopback, and I have a domain I just bought (andrewclarke.ca). I'm hosting this at home, behind a debian-based firewall/router.
The problem is that if I go to andrewclarke.ca or my static IP from within my home network I get a connection refused. My IP returns pings but that's about it. I figured I'd set up bind to resolve *.andrewclarke.ca back to the internal IPs for whatever service I want.
I've managed to get bind to where if I "ping www.andrewclarke.ca" with bind running I get "unknown host". So at least I know I'm doing something partially right. What I want though is for me to get 192.168.16.5 or whatever my internal web server IP is, rather than my public IP which is what I get from my public nameservers.
If anyone has any idea what I'm doing wrong here, I'd really appreciate it.
Thanks,
- Andrew.
named.conf:
Code:
################################################################################
# Logging Configuration
#
logging {
#
# Define channels for the two log files
#
channel query_log {
severity info;
print-time yes;
file "/etc/bind/query.log" versions 3 size 100M;
};
channel activity_log {
severity info;
print-time yes;
print-category yes;
print-severity yes;
file "/etc/bind/activity.log" versions 3 size 100M;
};
#
# Send the interesting messages to the appropriate channels
#
category queries { query_log; };
category default { activity_log; };
category xfer-in { activity_log; };
category xfer-out { activity_log; };
category notify { activity_log; };
category security { activity_log; };
category update { activity_log; };
#category update-security { activity_log; }; # BIND 9.3 only
#
# Dump all uninteresting messages
#
category network { null; };
category lame-servers { null; };
};
options {
directory "/var/cache/bind";
query-source address * port 53;
forwarders {
207.179.130.2;
207.179.130.3;
};
listen-on-v6 { any; };
allow-transfer { any; };
auth-nxdomain yes; # conform to RFC1035
allow-query { any; }; # allow anyone to issue queries
notify yes; # disable AA notifies
listen-on {
192.168.16.1;
127.0.0.1;
};
};
zone "." {
type hint;
file "/etc/bind/db.root";
};
zone "localhost" {
type master;
file "/etc/bind/db.local";
};
zone "127.in-addr.arpa" {
type master;
file "/etc/bind/db.127";
};
zone "0.in-addr.arpa" {
type master;
file "/etc/bind/db.0";
};
zone "255.in-addr.arpa" {
type master;
file "/etc/bind/db.255";
};
zone "andrewclarke.ca" {
type master;
file "/etc/bind/ca.andrewclarke.db";
};
zone "16.168.192.in-addr.arpa" {
type master;
file "/etc/bind/192.rev";
};
ca.andrewclarke.db
Code:
;
; BIND data file for andrewclarke.ca
;
$TTL 604800
andrewclarke.ca. IN SOA ns1.andrewclarke.ca. root.andrewclarke.ca. (
2007052803 ; Serial
604800 ; Refresh
86400 ; Retry
2419200 ; Expire
604800); Negative Cache TTL
;
andrewclarke.ca IN NS ns1.andrewclarke.ca
ns1 IN A 192.168.16.1
luthien IN A 192.168.16.2
www IN CNAME 192.168.16.2
192.rev
Code:
;
; BIND reverse data file for 192.168.16.0
;
@ IN SOA andrewclarke.ca. root.andrewclarke.ca. (
2007052901 ; Serial
604800 ; Refresh
86400 ; Retry
2419200 ; Expire
604800 ) ; Default TTL
;
IN NS ns1.andrewclarke.ca.
2 IN PTR www.andrewclarke.ca.
1 IN PTR dns.andrewclarke.ca.
17 IN PTR mail.andrewclarke.ca.