Firewall
Instance security is provided by a firewall. With the various features of the Arvancloud Cloud Server firewall and the set of rules you define on your server's firewall, you can make sure your instances are secure.
In the Firewall section of the Cloud Server panel, you can create various rules and configure, manage, or delete them.
Creating a New Firewall
When you create a new firewall, you can connect various instances to it so that every rule you create in it applies to all instances in that group. New instances are automatically placed in the Default firewall unless you put them in another firewall when creating the instance.
To create a firewall, go to Firewall in the Cloud Server panel and click New Firewall.
Then, by entering a name for the new firewall and clicking Create Firewall, the new firewall is created. In the same section, you can add the default rules to your new firewall. These rules are designed to allow internet access and SSH connections.
After defining the firewall, you can define rules for it or assign the firewall to the instances you want.
Creating a New Rule
Rules do the main work of the firewall. With rules, you can open or close a port. A rule consists of a protocol, a port, and a source or destination address.
After a firewall is created, by default there are two rules that allow all outbound IPv4 and IPv6 access. To define more rules, click New Rule next to the firewall.
The firewall details page then opens. On this page, you can define new inbound and outbound rules separately for IPv4 or IPv6. Inbound rules specify which IP addresses are allowed to connect to the instances, and outbound rules specify which IP addresses the instance can connect to. Except for what is allowed in the rules, all other inbound and outbound traffic is blocked.
Click New Rule to enter the rule's details.
These details include the following:
Protocol
In this section, choose the protocol from TCP and UDP. Common protocols such as ICMP, SMTP, and others are also listed, so you can easily use them if you need to.
Note that if you want to enter your own port, you must set the protocol to TCP or UDP.
Port
When the protocol is TCP or UDP, you can enter a port, a range of ports, or "all" for all ports in this section.
Source/Destination
In this section, you can enter the IPs that are allowed to access and connect. Allowed values are a single IP, an IP range, and "all" for all IPs.
Finally, click the + option to create the rule and add it under the firewall. This way, you can create the set of rules you want.
Connecting a Firewall to an Instance
For a firewall's rules to be used to secure an instance, you need to assign that firewall to the instance. To do this, go to Firewall in the Cloud Server panel and click Connected Instances next to the firewall's name.
Then, on the page that opens, click Connect New Instance.
Select the instance and the port address and click the + button.
From then on, the defined firewall rules protect the instance.
Managing Firewalls
On the firewall list page, you can manage each firewall by clicking the actions option next to it.
For example, you can rename the firewall or add tags to it for better firewall management.
Deleting a Firewall
To delete a firewall, click the delete option and then confirm the process.
Note that deleting a firewall disconnects the instances connected to it, and all rules defined under it are also deleted.