Q. How do I Change the IP Address of a Domain or Host under BIND 8 or 9?
A. You can easily change the IP address of a Domain or host under BIND dns software. You need to update zone database. Usually, named.conf file contains the location for zone file for each domain. You need to open this file using a text editor such as vi and update the domain / HOST IP including serial number. You need to only make changes on master BIND DNS server.
Follow the steps below if you want to change IP address of a domain / host. Open named.conf on master dns server, enter:
# vi named.conf
Find domain name. For example, entry for theos.in, look like as follows:
zone "theos.in" {
type master;
file "/etc/bind/zones/master.theos.in";
allow-transfer { key TRANSFER; };
};Open zone database file called /etc/bind/zones/master.theos.in, enter:
# vi /etc/bind/zones/master.theos.in
Find A (IP Adress) dns recored for domain called theos.in, which may look like as follows:
@ 3600 IN A 75.126.168.153 www 3600 IN A 75.126.168.153
Update it as follows to change IP from 75.126.168.153 to 64.12.54.5, enter:
@ 3600 IN A 64.12.54.5 www 3600 IN A 64.12.54.5
Find serial number, which may look like as follows:
2007071012
And update it:
2007071013
Here is zone before any changes:
$ORIGIN theos.in.
$TTL 3h
@ IN SOA ns1.nixcraft.net. vivek.nixcraft.com. (
2007071012 ; Serial yyyymmddnn
3h ; Refresh After 3 hours
1h ; Retry Retry after 1 hour
1w ; Expire after 1 week
1h) ; Minimum negative caching of 1 hour
@ 3600 IN NS ns1.nixcraft.net.
@ 3600 IN NS ns2.nixcraft.net.
@ 3600 IN TXT "v=spf1 mx ~all"
@ 3600 IN A 75.126.168.153
www 3600 IN A 75.126.168.153Here is zone after the IP Address change:
$ORIGIN theos.in.
$TTL 3h
@ IN SOA ns1.nixcraft.net. vivek.nixcraft.com. (
2007071013 ; Serial yyyymmddnn
3h ; Refresh After 3 hours
1h ; Retry Retry after 1 hour
1w ; Expire after 1 week
1h) ; Minimum negative caching of 1 hour
@ 3600 IN NS ns1.nixcraft.net.
@ 3600 IN NS ns2.nixcraft.net.
@ 3600 IN TXT "v=spf1 mx ~all"
@ 3600 IN A 64.12.54.5
www 3600 IN A 64.12.54.5Save and close the file. Reload bind:
# rndc reload
Featured Articles:
- 20 Linux System Monitoring Tools Every SysAdmin Should Know
- 20 Linux Server Hardening Security Tips
- My 10 UNIX Command Line Mistakes
- Linux: 20 Iptables Examples For New SysAdmins

- 25 PHP Security Best Practices For Sys Admins
- The Novice Guide To Buying A Linux Laptop
- 10 Greatest Open Source Software Of 2009
- Top 5 Email Client For Linux, Mac OS X, and Windows Users
- Top 20 OpenSSH Server Best Security Practices
- Top 10 Open Source Web-Based Project Management Software
- Top 5 Linux Video Editor Software
Facebook it - Tweet it - Print it -


{ 1 comment… read it below or add one }
I have tried to write a response here and each time I try it refreshes the screen or provides an error. Can the writer could possibly look into the reason it keeps messing up?