Manage cloud firewall rules
For Cloud Firewall, you can add new rules, modify existing rules, change the order of rules, and enable, disable, and delete rules.
Add rule
After adding a deny rule on the cloud router, active sessions that match the rule will be terminated.
You can add up to 100 rules per traffic direction (policy) for a single cloud firewall.
Control panel
OpenStack CLI
- In the dashboard, on the top menu, click Products and select Cloud Servers.
- Go to the Firewalls section.
- Open the firewall page.
- Select the direction of traffic:
Incoming traffic
Outgoing traffic
-
Open the Incoming Traffic tab.
-
Click Create Rule.
-
Select an action:
- Allow - Allow traffic;
- Deny - Deny traffic.
-
If the templates with rules for inbound traffic are suitable for you, select a rule. The Protocol, Source, Source Port, Traffic Destination, and Destination Port fields will be filled in automatically. Proceed to step 15.
-
If there is no suitable template, add your own rule for incoming traffic.
-
Select a protocol: ICMP, TCP, UDP or All (Any).
-
Enter the traffic source (Source) - IP address, subnet, or all addresses (Any).
-
Enter the source port (Src. port) - a single port, a range of ports, or all ports (Any).
-
Enter the Destination - IP address, subnet, or Any. If you specify a subnet, the rule applies to all devices on the subnet.
-
Enter the destination port (Dst. port) - a single port, a range of ports, or all ports (Any).
Traffic to any TCP/UDP port blocked in Selectel by default will be denied even if you specify that port in the rule.
-
Enter a name for the rule or leave the name created automatically.
-
Optional: enter a comment for the rule.
-
Click Add.
- Check the order of the rules, they are executed in order in the list - from top to bottom. If necessary, change the order by dragging and dropping the rules. After creating the firewall, you can change the order of the rules.
Change the rule
After changing a rule on the cloud router, active sessions that match the changed rule will be terminated.
Control panel
OpenStack CLI
-
In the dashboard, on the top menu, click Products and select Cloud Servers.
-
Go to the Firewalls section.
-
Open the firewall page.
-
Open the tab depending on which traffic you want to change the rule for:
- for incoming traffic - Incoming traffic;
- for outgoing traffic - Outgoing traffic.
-
From the menu of the rule, select Change Rule.
Incoming traffic
Outgoing traffic
-
Select an action:
- Allow - Allow traffic;
- Deny - Deny traffic.
-
If the templates with rules for inbound traffic are suitable for you, select a rule. The Protocol, Source, Source Port, Traffic Destination, and Destination Port fields will be filled in automatically. Proceed to step 14.
-
If there is no suitable template, add your own rule for incoming traffic.
-
Select a protocol: ICMP, TCP, UDP or All (Any).
-
Enter the traffic source (Source) - IP address, subnet, or all addresses (Any).
-
Enter the source port (Src. port) - a single port, a range of ports, or all ports (Any).
-
Enter the Destination - IP address, subnet, or Any. If you specify a subnet, the rule applies to all devices on the subnet.
-
Enter the destination port (Dst. port) - a single port, a range of ports, or all ports (Any).
Traffic to any TCP/UDP port blocked in Selectel by default will be denied even if you specify that port in the rule.
- Enter a name for the rule or leave the name created automatically.
- Optional: enter a comment for the rule.
- Click Save.
Change the order of the rules
After the rule order change, active sessions on the cloud router that match the new rule order will be terminated.
Control panel
-
In the dashboard, on the top menu, click Products and select Cloud Servers.
-
Go to the Firewalls section.
-
Open the firewall page.
-
Open the tab depending on which traffic you want to change the order of the rules for:
- for incoming traffic - Incoming traffic;
- for outgoing traffic - Outgoing traffic.
-
Click Change the order of the rules.
-
Drag and drop the rules. The rules are executed in order in the list - from top to bottom.
-
Click Save the order of the rules.
Enable rule
Control panel
OpenStack CLI
-
In the dashboard, on the top menu, click Products and select Cloud Servers.
-
Go to the Firewalls section.
-
Open the firewall page.
-
Open the tab depending on which traffic you want to enable the rule for:
- for incoming traffic - Incoming traffic;
- for outgoing traffic - Outgoing traffic.
-
On the line with the rule, include the rule.
Disable rule
The rule will no longer be in effect - traffic that was allowed by this rule will be denied. Active sessions that were set by this rule will be terminated on the cloud router.
Control panel
OpenStack CLI
-
In the Dashboard, on the top menu, click Products and select Cloud Servers.
-
Go to the Firewalls section.
-
Open the firewall page.
-
Open the tab depending on which traffic you want to disable the rule for:
- for incoming traffic - Incoming traffic;
- for outgoing traffic - Outgoing traffic.
-
On the line with the rule, disable the rule.
Delete rule
The rule will no longer be in effect - traffic that was allowed by this rule will be denied. Active sessions that were set by this rule will be terminated on the cloud router.
Control panel
OpenStack CLI
-
In the Dashboard, on the top menu, click Products and select Cloud Servers.
-
Go to the Firewalls section.
-
Open the firewall page.
-
Open the tab depending on which traffic you want to remove the rule for:
- for incoming traffic - Incoming traffic;
- for outgoing traffic - Outgoing traffic.
-
From the menu of the rule, select Delete Rule.
-
Click Delete.