need to change ip addrerss's quick!

Discussion in 'General' started by steve51184, Nov 2, 2008.

  1. steve51184

    steve51184 New Member

    hi all i just got an email from my host saying i need to change my ip's on my server (ubuntu 7) but he suggested i simply add the new ones so i can make sure they work then remove the old ones but in isp config i can only have 1 main ip and 1 sub net so how do i go about doing this? also how do i change the dns ips?


    p.s. i was asked to change the main ip address (with the 4 others totaling 5), gateway, subnet mask and 2 dns ip's
     
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    You may have as many IP's in ISPConfig as you like. Just add them in the additional IP field. There is no difference between the main IP and additional IP's. The subnet mask does not matter as it is not used if you did not enable automatic network card configuration.
     
  3. steve51184

    steve51184 New Member

    thanks for the amazingly fast reply BUT i have to change all ip's including the main ip so how would i do this? also what about the dns ips?
     
  4. till

    till Super Moderator Staff Member ISPConfig Developer

    Edit or elect the new IP addresses in the websites and dns records and click save.
     
  5. steve51184

    steve51184 New Member

    but this isn't just for the websites and dns records this is the servers main ip's and if i get it wrong i've messed up my server
     
  6. till

    till Super Moderator Staff Member ISPConfig Developer

    This applies to all settings incl. the mains erver settings.
     
  7. steve51184

    steve51184 New Member

    yeah but like i said if i get it wrong somehow then my server will be unreachable :(
     
  8. lubos

    lubos New Member HowtoForge Supporter

    If I am not mistaken you are worried about settings in your /etc/network/interfaces

    In this case just do:

    Code:
    vi /etc/network/interfaces
    and correct your settings there. Either you can just change your settings or you can add second IP to it (see eth0:1 - that is another IP added to the server)

    Code:
    auto lo
    iface lo inet loopback
    
    auto eth0
    iface eth0 inet static
            address xxx.xxx.xxx.xxx
            netmask 255.255.255.128
            network xxx.xxx.xxx.yyy
            broadcast xxx.xxx.xxx.zzz
            gateway xxx.xxx.xxx.www
            # dns-* options are implemented by the resolvconf package, if installed
            dns-nameservers aaa.aaa.aaa.aaa
            post-up ethtool -K eth0 tx off
    
    auto eth0:1
    iface eth0:1 inet static
            address xxx.xxx.xxx.vvv
            netmask 255.255.255.128
            network xxx.xxx.xxx.yyy
            broadcast xxx.xxx.xxx.zzz
            gateway xxx.xxx.xxx.www
    
    !!!IMPORTANT!!!
    You should have in mind that if you have a router the settings in etc/network/interfaces will be settings of your router, in this case you need to change settings on your router not on the server!

    Furthermore you will have to change all settings in ISPConfig as described above:
    1. Set new main IP in Management=> Server => Settings
    2. Add further IP addresses at the same place
    3. Correct all domains and
    4. Correct all DNS records.

    You can do it in ISPConfig by clicking and rewriting or you can download your database from PHPMyAdmin (dump database) fix it on your comp in spreadsheet and import fixed database back.

    Hope that helps
     

Share This Page