Humble Trader

Wednesday, December 28, 2005

Configure DNS

Introduction:

DNS (Domain Name System) is the stuff that turn URLs into IP Adresses and vice versa.

Aim:

We are going to set this up so that an addresses local to the network are resolved locally, and any that are for the internet are passed on.

Requirements:

You will need the following:

  • Your domain name (You need to make up a name for your network. I use steveroach.org partly because that's my name and partly because I used to own that domain. You can use whatever you like as it is hidden from the rest of the internet anyway. It's best to avoid any real domains or you won't be able to navigate the net properly.)
  • Your server name.
  • Your server IP address.
  • Your PC name.
  • Your PC IP address.
  • Your ISP's DNS server IP addresses (If they are not on your ISP's home page, give support a call).
Procedure:
# service named restart
Stopping named: [FAILED]
Starting named: [ OK ]
# named-checkconf -z
zone steveroach.org/IN: loaded serial 1290
zone 0.168.192.in-addr.arpa/IN: loaded serial 1291
zone localhost/IN: loaded serial 1290
zone 0.0.127.in-addr.arpa/IN: loaded serial 1290
zone 0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.ip6.arpa/IN:
loaded serial 1290
zone 255.in-addr.arpa/IN: loaded serial 1290
zone 0.in-addr.arpa/IN: loaded serial 42
zone bind/CH: loaded serial 1290
# service named status
number of zones: 8
debug level: 0
xfers running: 0
xfers deferred: 0
soa queries in progress: 0
query logging is ON
recursive clients: 0/1000
tcp clients: 0/100
server is up and running
#
  • Add named to the boot scripts:
    • # cd /etc/init.d
    • # vi named
    • Change the line; '# chkconfig – 11 89' to '# chkconfig 35 11 89'
    • # chkconfig –-del named
    • # chkconfig –-add named
  • Set DNS logging:
    • # cd /etc/sysconfig
    • # vi syslog
    • Change the line: 'SYSLOGD_OPTIONS="-m 0"' to 'SYSLOGD_OPTIONS="-m 0 -a /var/named/chroot/var/log"'
  • Turn off IPv6:
    • # cd /etc
    • # vi modprobe.conf
    • Add these lines to the bottom of the file:
    • alias ipv6 off
    • alias net-pf -2 ipv4
  • Configure Firefox:
    • Start Firefox
    • Type; 'about:config' into address bar
    • Type 'network' into filter field
    • Right-click 'network.dns.disableIPv6'
    • [Toggle] to 'true'
    • Right-click 'network.http.pipelining'
    • [Toggle] to 'true'
    • Close Firefox
  • Make resolv.conf permanent:
    • # cd /etc
    • # cp resolv.conf resolv.conf.local
    • # vi resolv.conf.local
    • Edit the file to look like this:
      • search steveroach.org (your domain name)
      • nameserver 127.0.0.1
      • nameserver 203.50.2.71 (your ISP's primary DNS server IP)
      • nameserver 139.130.4.4 (your ISP's secondary DNS server IP)
    • # cd /sbin
    • # vi dhclient-script
    • Find the line; 'rm -f \$rscf' by typing: /rm -f \$rscf
    • O(pen a new line)
    • Add this new line to the script: cp /etc/resolv.conf.local /etc/resolv.conf
  • Reboot the server.
Testing:

Extensive testing will be done later when the firewall is in and the network is connected.

0 Comments:

Post a Comment

<< Home