Basically, I am trying to configure BIND for one website, I have a static ip address, and it is being run off of one gentoo box that also houses the web server.
Sorry if I sound so helpless, it's been a long morning

Code: Select all
logging {
// severity can be one of: debug info
channel "my_syslog" { syslog daemon; severity info; };
category "default" { "my_syslog"; "default_debug"; };
};
options {
directory "/var/bind";
version "Bind";
// Interfaces listened on
listen-on-v6 { none; };
listen-on { 127.0.0.1; 192.168.0.8; };
// Allows only specific hosts to use the DNS server
allow-query { 127.0.0.1; 192.168.0.8; 192.168.0.9; };
// Lock down recursive queries too
allow-recursion { 127.0.0.1; 192.168.0.8; 192.168.0.9; };
// if you have problems and are behind a firewall:
//query-source address * port 53;
pid-file "/var/run/named/named.pid";
};
// Prime the server with knowledge of the root servers.
zone "." IN {
type hint;
file "named.ca";
};
// Be authoritative for the localhost forward and reverse zones, and for
// broadcast zones as per RFC 1912.
zone "localhost" IN {
type master;
file "pri/localhost.zone";
allow-update { none; };
notify no;
};
zone "127.in-addr.arpa" IN {
type master;
file "pri/127.zone";
allow-update { none; };
notify no;
};
Code: Select all
$ORIGIN 127.in-addr.arpa.
$TTL 1W
@ 1D IN SOA localhost. root.localhost. (
15 ; Serial
3H ; Refresh
15M ; Retry
1W ; Expiry
1D ) ; Minimum
1D IN NS localhost.
* 1D IN PTR localhost.
Code: Select all
$TTL 1W
@ IN SOA ns.localhost. root.localhost. (
15 ; Serial
3H ; Refresh
15M ; Retry
1W ; Expiry
1D ) ; Minimum
IN NS 127.0.0.1
localhost. IN A 127.0.0.1
Code: Select all
# This entry may not be needed
nameserver 127.0.0.1
# Added automatically, from DNSDOMAIN in /etc/conf.d/domainname
domain homenetwork
Code: Select all
127.0.0.1 localhost pcname
192.168.0.8 pcname.homenetworkCode: Select all
logging {
// severity can be one of: debug info
channel "my_syslog" { syslog daemon; severity info; };
category "default" { "my_syslog"; "default_debug"; };
};
options {
directory "/var/bind";
version "Bind";
listen-on-v6 { none; };
allow-recursion { 127.0.0.1; };
pid-file "/var/run/named/named.pid";
};
// This is the master server for company.com
zone "company.com" {
type master;
file "pri/company.com.zone";
};
// Reverse zone for company.com
zone "78.56.34.12.in-addr.arpa" {
type master;
file "pri/78.56.34.12.zone";
};
zone "." IN {
type hint;
file "named.ca";
};
zone "localhost" IN {
type master;
file "pri/localhost.zone";
allow-update { none; };
notify no;
};
zone "127.in-addr.arpa" IN {
type master;
file "pri/127.zone";
allow-update { none; };
notify no;
};
Code: Select all
$TTL 3D
company.com. IN SOA ns.company.com. root.company.com. (
27 ; Serial
1D ; Refresh
30M ; Retry
1W ; Expiry
1D ) ; Minimum
@ IN NS ns.company.com.
@ IN NS ns0.nameserver.net.
@ IN NS ns1.nameserver.net.
@ IN MX 0 mail.company.com.
@ IN A 12.34.56.78
ns IN A 12.34.56.78
mail IN A 12.34.56.78
www IN A 12.34.56.78
ftp IN A 12.34.56.78
Code: Select all
$TTL 3D
@ IN SOA ns.company.com. root.company.com. (
27 ; Serial
1D ; Refresh
30M ; Retry
1W ; Expiry
1D ) ; Minimum
@ IN NS ns.company.com.
@ IN NS ns0.nameserver.net.
@ IN NS ns1.nameserver.net.
@ IN PTR company.com.
@ IN PTR ns.company.com.
@ IN PTR www.company.com.
@ IN PTR mail.company.com.
@ IN PTR ftp.company.com.
Code: Select all
# This entry may not be needed
nameserver 127.0.0.1
# Added automatically, from DNSDOMAIN in /etc/conf.d/domainname
domain company.com
Code: Select all
127.0.0.1 localhost
12.34.56.78 ns.company.com ns
Code: Select all
recursion no;

Servers are meant to have static IP addresses. Dynamic IP addresses would be a recipe for unreliability.bhogg wrote:How would these config files be modified if a DNS server had a dynamic IP address?
I have /var/run/named/named.pid (defined by PIDFILE in /etc/conf.d/named), containing the process ID (same as shown by "ps ax | grep named"). It is used by start-stop-daemon in /etc/init.d/named.Also, by default, there doesn't seem to be a named.pid on my system after emerging bind
The web site is currently for a low-traffic project, and does not need high reliability. I have a no-ip.com address pointing to the same server which works well. Just need this new .ca to forward/resolve to the same address. Needless to say trying to put the no-ip address in zone files didn't do much of anything. The IP Address is resolving locally though, will probably take time to propogate.[/quote]Servers are meant to have static IP addresses. Dynamic IP addresses would be a recipe for unreliability.
I was having issues starting named previously, but now that it is running the .pid file exists where needed.I have /var/run/named/named.pid (defined by PIDFILE in /etc/conf.d/named), containing the process ID (same as shown by "ps ax | grep named"). It is used by start-stop-daemon in /etc/init.d/named.



emerge ddclientGinta wrote:dynamic IP address?
Code: Select all
daemon=36000
syslog=yes
mail-failure=root
ssl=yes
protocol=dyndns2
use=web
login=yourlogin
password=yourpassword
yoursubname.dyndns.orgI dunno how i did get around this problem, but at my hosting company i've edited some DNS options and did get redirected even with a dynamic IP, dunno though what DNS program thy run...PaulBredbury wrote: You cannot have bind on that dynamic IP acting as a nameserver to resolve to that dynamic IP, though - an Internet-facing nameserver must be on a static IP, to be reliable.

Of course, but what happens when your IP address changes? That' the point.oddthing wrote:did get redirected even with a dynamic IP
No changes at all... since ddclient changes ip at the my.dyn.ipPaulBredbury wrote: Of course, but what happens when your IP address changes? That' the point.
Code: Select all
example.dom - num.example.dom
|
my.dyn.ip (updated by ddclient)
|
[home computer] - one.num.example.dom (vhost)
- two.num.example.dom (vhost)