Starting a cloud server firewall

Tags: ACG

Practicing Cloud Server safety is a vital part of keeping you and your team protected while learning on the cloud. This article will show you a few ways to set up a secure learning environment.

Running commands

To make sure the web console is not blocked, add Web Console port 31297 in one command. Do this with Firewalld and UFW.

Tip: All commands need to be run as root.

Firewalld

systemctl start firewalld && firewall-cmd --add-port 31297/tcp --permanent && firewall-cmd --reload

 

UFW

After the UFW service is started, the firewall itself is not yet enabled. This means you can run the commands in separate entries instead of all at once.

Start by making sure the firewall service is running. This is slightly different depending on the version of Ubuntu:

Ubuntu 16 

systemctl start ufw

Ubuntu 14

service ufw start 

Add the port for the web console to the firewall. 

Tip: Add port 22 for regular SSH tool.

ufw allow 31297
ufw allow 22
ufw enable

You are ready to continue your cloud learning journey.

Unblocking the web console

Use the following solution to unblock the Web Console and regain access to your server. 

First, log into the root account and run the appropriate command for your server.

CentOS 7 or Red Hat 7 with Firewalld

firewall-cmd --add-port 31297/tcp --permanent && firewall-cmd --reload

Ubuntu with UFW

ufw allow 31297

back to top


If you need help, please contact Pluralsight Support.