Hi there,
I SSH to our servers remotely and want to change the IP address of the server on the fly.
Current IP config:
Server 1.
eth0 10.2.3.3 netmask 255.255.255.0 broadcast 10.2.3.255
alias:
eth0:0 10.2.3.33 netmask 255.255.255.0 broadcast 10.2.3.255
Server 2.
eth0 10.2.3.4 netmask 255.255.255.0 broadcast 10.2.3.255
alias:
eth0:0 10.2.3.44 netmask 255.255.255.0 broadcast 10.2.3.255
I SSH to the alias of Server 2, and want to change the actual IP, 10.2.3.4, to 10.2.3.5
So I typed:
ifconfig eth0 10.2.3.3 netmask 255.255.255.0 broadcast 10.2.3.255 [enter]
Lost connection.
So when I was there locally, I logged in to the console, and saw it accepted the IP able to ping other host on the same network. Not if I try to SSH from Public (remote VPN client, and VPN connection from firewalls).
But when I restarted the network service (/etc/init.d/network restart) it goes BACK to the IP address that I entered in on the Network GUI interface (Hat -> System Configurations -> Network -> eth0 -> Edit).
We tried editing /etc/rc.d/rc.local file by putting the IP there, eth1, eth2, disable eth0 and .... nothing!!.
It will only accept PERMANENTLY when I make the change in Network GUI interface -> Activate -> restart the network interface. AND only will I then be able to connnect to it via SSH from public side.
Please Help Me! I am desperate here! Thank you!