Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Change multiple DNS zones

Discussion in 'Bind / DNS / Nameserver Issues' started by ruber, Jul 5, 2007.

  1. ruber

    ruber Member

    Joined:
    Jun 5, 2007
    Messages:
    22
    Likes Received:
    0
    Trophy Points:
    151
    I had transfered some accounts from another server.
    When it finished, the DNS zones were "imported" from the old server, including its IPs.

    Is any way to change the values of DNS zones of all domains?
     
  2. Spiral

    Spiral BANNED

    Joined:
    Jun 24, 2005
    Messages:
    2,023
    Likes Received:
    8
    Trophy Points:
    193
    Best way it to login via SSH and go to the /var/named folder and then
    use "replace" commands to change what you need to change.

    IE: replace "111.111.111.111" "222.222.222.222" -- *.db
     
  3. zye

    zye Well-Known Member

    Joined:
    Dec 6, 2002
    Messages:
    105
    Likes Received:
    2
    Trophy Points:
    168
    perl -pi -e 's/old.ip/new.ip/g' *.db

    cheers
    zye
     
Loading...

Share This Page