Basic Firewall Information and Rule Setting

2019-12-16 By Kelvin 7561 Views linux windows layerpanel firewall security networking
8 reviews

Firewall is an integral part of any system and can be used to protect a server against unauthenticated access from the outside world. It helps to prevent hackers from logging into servers on the network. Firewall can also be used to set up specific rules in-order to restrict access to specific ports of the system based on IP address.


The basic functionality of a firewall is to monitor the incoming and outgoing traffic and choose whether to block a particular connection or let it through based on the defined set of security rules.

Accept => Allow the traffic to the server.

Reject => Block the traffic to the server.


The following are the common port numbers:


Port Name of the Service Transport protocol
20,21 FTP TCP
22 SSH TCP and UDP
23 Telnet TCP
25 SMTP TCP
50,51 IPSec /
53 DNS TCP and UDP
67,68 DHCP UDP
69 TFTP UDP
80 HTTP TCP
110 POP3 TCP
119 NNTP TCP
123 NTP TCP
135-139 NetBIOS TCP and UDP
143 IMAP TCP and UDP
161,162 SNMP TCP and UDP
389 Lightweight Directory Access TCP and UDP
443 HTTPS TCP and UDP
465 SMTP over SSL TCP
989 FTP Protocol (data) over TLS/SSL TCP and UDP
990 FTP Protocol (data) over TLS/SSL TCP and UDP
993 IMAP over SSL TCP
995 POP3 over SSL TCP
3389 Remote Desktop TCP and UDP
  • Ports 0 to 1023 are Well-Known Ports.
  • Ports 1024 to 49151 are Registered Ports (often registered by a software developer to designate a particular port for their application)
  • Ports 49152 to 65535 are Public Ports.


How to create your Firewall rules in LayerPanel ?

  1. Log in to LayerPanel v2.0.

  2. Click Services in the left pane and then on Firewalls.

  3. Click + Create Firewall.

  4. Specify a name for the firewall rule set and click +Add New Inbound Rules / +Add New Outbound Rules to add required inbound and outbound firewall rules as per your requirement.

  5. From the drop-down list under the Assigned Cloud Servers option, select the Cloud Servers to which you require to add the firewall ruleset.

    The above example helps to create the below Inbound rules:

    Firewallsample1

  • 1st: Custom rule to allow inbound traffic to port 22 only from the IP address 123.123.123.123.

  • 2nd: Rule to allow inbound traffic to port 80 from all remote IP addresses.

  • 3rd: This rule will enable ping from all remote IP addresses.

  • 4th: Custom rule to allow inbound traffic to the ports 150 -160 only from the IP 123.123.123.123.

    The above example helps to create the below outbound rules:

    Firewallsample2

  • 1st: Custom rule to allow outbound traffic to ports 150 - 160 to all IP addresses from the server.

  • 2nd: Rule to allow outbound traffic to port 22 to all IP addresses from the server.

  • 3rd: Custom rule to allow outbound traffic to port 1005 to the IP 123.123.123.123 from the server.

  • 4th: Rule to allow outbound traffic to port 80 to all IP addresses from the server.

    NOTE: Once any rule has been added for any specific port, all other connections to that port will be blocked by default.

    For example, if an inbound firewall rule is added for the SSH port (say SSH access from any specific IP), then SSH access will be restricted as per the added rule. Rest all connections to the SSH service will be blocked.

  1. From the drop-down list under the Assigned Cloud Servers option, select the Cloud Servers to which you require to add the firewall ruleset.

  2. Click Save to complete the setting.


Related Feature on LayerPanel


Related Tutorials

What do you think about this article?

Rate this article
Need assistance?

Try this guide to receive free bundled services at signup on a new free account.

Sign Up

Your Feedback Is Important

We hope you’ll give the new products and updates a try. If you have an idea for improving our products or want to vote on other user ideas so they get prioritized, please submit your feedback on our Community platform. And if you have any questions, please feel free to ask in the Community or contact our Technical Support team.