
Step 1: Change password
Many VPS provider offers an interface to change password at the management portal, however it is suggested to perform change password request within the VPS environment for better security. Please note that by changing the password within the VPS you will prevent the VPS management portal to learn the new password thus any "password recovery" options offered will be useless. You will need to re-build the VPS if you lost your password changed with the below command:
# passwd
The system will prompt you to input new password twice. Note that no masked characters will be shown on screen as you type.Step 2: Change timezone
This is not a critical step but I prefer to set the timezone corresponding to the location of the VPS. This may help troubleshooting.
# dpkg-reconfigure tzdata
Depends on your VPS configuration, this command yields different interfaces for configuring timezone. Below is an example (which is a fancy one) of the configuration screen:Step 3: Configure firewall
Setup a firewall in the VPS to enhance network security. It is important to note that you should enable ufw directly from the console interface of your VPS instead of from SSH.
# apt-get update
# apt-get install ufw
After enabling the firewall service by running# ufw enable
You may want to continue your setup using SSH client. Simply allow the below rule (assume you are running SSH server on standard TCP port 22)
# ufw allow 22/tcp
Note:1. You may sometimes check your firewall status by running:
# ufw status verbose
2. For entry level VPS you may also want to disable logging to improve system performance (the current log level is displayed by the above status check command):
# ufw logging off
3. Current distributions of VPS (Ubuntu Server 13.10 or later) support simple setup to allow port range. The command below would allow any traffic to TCP port ranged 60000 to 61000. This rule may be useful for enabling passive FTP transfers.# ufw allow 60000:61000/tcp
Your Ubuntu VPS is now good to go! Enjoy!
No comments:
Post a Comment