Instructions on how to update the server IP address
Last updated 2020-10-06 by Adam Lu
Suppose the IP address for fishfish changed from 128.143.15.11
to 172.28.76.139
- Update MobaXTerm settings for each Windows computer
- Right click on the saved session called
fishfish
, and hitEdit session
. - Change the value of the field
Remote host
to the new IP:172.28.76.139
.
- Right click on the saved session called
- Update VNC Viewer settings for each Windows computer
- Right click on each saved session for the server of interest such as
fishfish-6
, and hitProperties
. - Change the value of the field
VNC Server
to the new IP with the session number, for example, change128.143.15.11:6
to172.28.76.139:6
, where6
is the session number.
- Right click on each saved session for the server of interest such as
- Update mapped drives for each Windows computer
- Open a Windows Explorer to
Computer
. - Unlink any mapped drives to
128.143.15.11
and delete any network locations from128.143.15.11
. - Right click and hit
Add A Network Location
and enter\\172.28.76.139\shareX
as the address.
- Open a Windows Explorer to
-
Update bash scripts, instructions notes and URL files on the server
-
Open a terminal to the location
~/Settings_Linux
. -
Enter the following command:
## Replace the IP address in all files recursively # Note: This is a function in ~/Settings_Linux/scripts/adams_commands.sh # USAGE: replace_in_all_files [oldStr] [newStr] [dirsOrFiles (opt)] replace_in_all_files 128.143.15.11 172.28.76.139
and hit
y
to accept changes -
Enter the following command to update scripts to
/usr/local/bin
(to make them accessible from any location):## Note: This is a script in ~/Settings_Linux/scripts/ bash setup_binfiles.sh
-
Update the
Settings_Linux
git repository:## Note: This is a script in ~/Settings_Linux/scripts/ bash git_update.sh
-
-
Update the ufw firewall for the other server
-
Open a terminal on the other server (chalkboard in this case).
-
Enter the following command to view the current list of IPs blocked by the ufw firewall:
## This is an alias for 'sudo ufw status numbered' ufwall
-
Locate the entry numbers for the old server IP (
128.143.15.11
in this case). -
Suppose the entry numbers are 47-49, then remove entry 47 a total of 3 times:
## Note that after deleting entry #47, the following entries are shifted up by one, so entry #48 will become entry #47 sudo ufw delete 47 sudo ufw delete 47 sudo ufw delete 47
-
Add the new server IP (
172.28.76.139
in this case).## Note: This is a function in ~/Settings_Linux/scripts/adams_commands.sh # USAGE: add_IP [IPv4 address] [port number (opt)] # By default, the port numbers added are 22, 445 and 5900:5920 add_IP 172.28.76.139
-
Check the updated list of IPs blocked by the ufw firewall:
## This is an alias for 'sudo ufw status numbered' ufwall
-
Make sure the list of IPs for the chalkboard firewall on the website is updated as well.
-
-
Establish a new host key on the other server
-
Open a terminal on the other server (chalkboard in this case).
-
Login to the server (fishfish in this case)
## This is an alias for ssh -Y ${USER}@172.28.76.139 sshfishfish
-