Changing IP in DNS server

deltaned

Verified User
Joined
Jan 23, 2004
Messages
95
change the DNS settings to an other IP number in one step?
I had a code but my new computer doesent see my old disk so I lose it.

It is a little urgent, plz help!
 
Hello,

If you're changing all IPs on your system, this is the current guide:
http://help.directadmin.com/item.php?id=250

Below is a manual method which only touches dns, and doesn't change other areas required by DA:
Code:
perl -pi -e 's/(^|[\s.=\/])1.2.3.4([\s.>:])/\${1}4.3.2.1\${2}/g' /var/named/*.db
or more simply, but likely to make errors:
Code:
perl -pi -e 's/1.2.3.4/4.3.2.1/g' /var/named/*.db
Use the first one if you can. This will change all occurances of 1.2.3.4 to 4.3.2.1 in the dns zones.

John
 
Back
Top