ispCP - Board - Support
IP change - Printable Version

+- ispCP - Board - Support (http://www.isp-control.net/forum)
+-- Forum: ispCP Omega Support Area (/forum-30.html)
+--- Forum: Usage (/forum-34.html)
+--- Thread: IP change (/thread-12495.html)



IP change - maxott - 12-22-2010 04:55 AM

hello people,
i have ispcp 1.0.6

i have 2 ip adresses

now i gonna change internet provider, so IPs will change .

i wanted to ask
http://isp-control.net/documentation/howto:ispcp:change_ip

that is all i need to completely change ip? does it really work?
and where is writen my seconday ip ? bind doesnt use all 2 ip? or just main?

in docs file nothing writen about secondary

thanks.


RE: IP change - kilburn - 12-22-2010 05:39 PM

The instructions are broadly the same as in the howto. Things to change/add:

1. In the database update, instead of
Code:
mysql> UPDATE server_ips SET ip_number = "server2-ip" WHERE ip_id = 1;
You have to run two queries, each one replacing one of your IPs:
Code:
mysql> UPDATE server_ips SET ip_number = "new_ip_1" WHERE ip_number = "old_ip_1"
mysql> UPDATE server_ips SET ip_number = "new_ip_2" WHERE ip_number = "old_ip_2"

2. When changing bind/apache IP's, you have to replace both of them, so instead of:
Code:
sed -i "s/xxx.xxx.xxx.xxx/yyy.yyy.yyy.yyy/g" /etc/apache2/sites-available/* /etc/bind/* /var/cache/bind/* /etc/ispcp/*/working/*
You have to run
Code:
sed -i "s/xxx.xxx.xxx.xxx/yyy.yyy.yyy.yyy/g" /etc/apache2/sites-available/* /etc/bind/* /var/cache/bind/* /etc/ispcp/*/working/*
sed -i "s/zzz.zzz.zzz.zzz/ttt.ttt.ttt.ttt/g" /etc/apache2/sites-available/* /etc/bind/* /var/cache/bind/* /etc/ispcp/*/working/*
where xxx.xxx.xxx.xxx = old_ip_1, yyy.yyy.yyy.yyy = new_ip_1, zzz.zzz.zzz.zzz = old_ip_2, ttt.ttt.ttt.ttt = new_ip_2

It's really that simple.


RE: IP change - maxott - 12-25-2010 12:15 AM

ah, now its clear Smile

thank you