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:
    1
    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:
    7
    Trophy Points:
    0
    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:
    96
    Likes Received:
    1
    Trophy Points:
    8
    perl -pi -e 's/old.ip/new.ip/g' *.db

    cheers
    zye
     
Loading...

Share This Page