Change IP-numbers, finding all files to change

Discussion in 'Plugins/Modules/Addons' started by Taleman, Mar 17, 2017.

  1. Taleman

    Taleman Member

    I am going to use Migration Tool to move an ISPConfig multiserver setup. My plan is to change the IP numbers, so the new hosts get the same IP-numbers the old hosts had after the migration. So far I know these places where I have to change the IP number:
    • /etc/hosts (or just copy this from old host)
    • /etc/network/interfaces
    • /etc/mysql/my.cnf
    • /etc/postfix/main.cf
    • /etc/amavis/conf.d/60-<servername>
    • /etc/apache2/sites-available/ some vhosts have IP-number
    Are there any more files to check and change?
     
  2. iNet Specialists

    iNet Specialists New Member

    You can do an extensive search using the "grep" tool combined with "less".
    Code:
    # cd /etc
    # grep -r -E "[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\." | less
    You will get a lot of results (not all IPs), but then you can search inside "less"...
    /XXX.YYY.NNN
    Where those are the first three octets of the networks you are concerned about.
    
    Just make notes or copy and paste filenames where your IP addresses appear.
     
    till likes this.
  3. Taleman

    Taleman Member

    I just noticed the IP-number is in ISPConfig web interface. What are all the places where IP-numbers appear there?
     
  4. iNet Specialists

    iNet Specialists New Member

    Various tables in the dbispconfig structure contain IP addresses for different purposes...
    • Any of the dns_* tables (especially dns_rr)
    • firewall (if you use that feature)
    • mail_relay_recipient (if you identify relays using IPs)
    • openvz_* tables (if you use that feature)
    • server (if servers are identified using IPs and not FQDNs)
    • server_ip (for sure)
    • web_domain (if websites are assigned specific IPs)
    There is one place that MAY have IPs that you may not expect:
    • the mysql.user table that holds the schema for database access credentials
     

Share This Page