Skip to main content

Manage basic firewall rules

For a basic firewall, you can add new rules, edit existing rules and their order, delete rules.

See basic firewall rule configuration examples.

Add rule

warning

After adding the first rule for a direction, a base rule is automatically connected: all traffic that is not allowed is prohibited. The base rule cannot be deleted.

You can configure up to 15 rules for each traffic direction for a single basic firewall. You can add up to 30 IP addresses or subnets for the traffic source and traffic destination to each rule.

  1. In the Control panel, in the top menu, click Products and select Dedicated Servers.

  2. Go to the Basic firewall section.

  3. Open the firewall page.

  4. Open the tab depending on which traffic you want to add a rule for:

    • for inbound traffic — Inbound traffic;
    • for outbound traffic — Outbound traffic.
  5. If you have already added or edited rules, view the firewall status. Make sure that the firewall has the status APPLIED. In the menu of the rule list, click Edit rule list. Click Add rule.

  6. If you have not added or edited rules, click Add rule.

  7. Check the traffic direction.

  8. Select an action:

    • accept — accept traffic;
    • deny — deny traffic.
  9. Enter Source address — IP addresses from which you can accept requests.

  10. Enter Destination address — IP addresses to which you can accept requests.

  11. Enter Source port — the source port from which the request originates. You can enter a port or a range of ports; ports 1 to 65535 are available.

  12. Enter Destination port — the port on which requests will be received. You can enter a port or a port range; ports 1 to 65535 are available. Traffic to any TCP/UDP port blocked in Servercore by default will be blocked even if this port is specified in the rule.

  13. Select a protocol: TCP, UDP, ICMP, IPIP, GRE, ESP, AH.

  14. Optional: enter a rule description.

  15. Click Create rule.

  16. Check the order of the rules; they are executed in order in the list — from top to bottom. If necessary, change the rule order — drag and drop the rules.

  17. Click Activate list. When the rules are activated, the firewall status will change to APPLIED. Applying changes can take up to 30 seconds. If you do not activate the list, the rules will be reset.

Edit rule

  1. In the Control panel, in the top menu, click Products and select Dedicated Servers.

  2. Go to the Basic firewall section.

  3. Open the firewall page.

  4. Open the tab depending on which traffic you want to edit the rule for:

    • for inbound traffic — Inbound traffic;
    • for outbound traffic — Исходящий трафик.
  5. In the menu of the rule list, click Edit rule list.

  6. In the menu of the rule, click Edit rule.

  7. Change the parameter values in the rule.

  8. Click Save changes.

  9. Click Activate list. When the rules are activated, the firewall status will change to APPLIED. Applying changes can take up to 30 seconds. If you do not activate the list, the changes will be reset.

Change rule order

  1. In the Control panel, in the top menu, click Products and select Dedicated Servers.

  2. Go to the Basic firewall section.

  3. Open the firewall page.

  4. Open the tab depending on which traffic you want to change the order of rules for:

    • for inbound traffic — Inbound traffic;
    • for outbound traffic — Outbound traffic.
  5. In the menu of the rule, click Edit rule list.

  6. Drag and drop the rules. You cannot drag and drop the base rule.

  7. Click Activate list. When the rules are activated, the firewall status will change to APPLIED. Applying changes can take up to 30 seconds. If you do not activate the list, the changes will be reset.

Delete rule

warning

The rule will stop working — traffic that was allowed by this rule will be prohibited.

  1. In the Control panel, in the top menu, click Products and select Dedicated Servers.

  2. Go to the Basic firewall section.

  3. Open the firewall page.

  4. Open the tab depending on which traffic you want to delete the rule for:

    • for inbound traffic — Inbound traffic;
    • for outbound traffic — Outbound traffic.
  5. In the menu of the rule list, click Edit rule list.

  6. In the menu of the rule, click Delete rule.

  7. Click Activate list. When the rules are activated, the firewall status will change to APPLIED. Applying changes can take up to 30 seconds. If you do not activate the list, the changes will be reset.

Examples of basic firewall rule settings

warning

Rules are executed sequentially, in the order of the list. When the first rule is added, a default rule is automatically attached: all traffic that is not allowed by the rules is denied. You cannot delete the default rule. For more information, see the How it works section of the General information about basic firewall guide.

Allow traffic only from a specific IP address

  1. In the Control panel, in the top menu, click Products and select Dedicated Servers.

  2. Go to the Basic firewall section.

  3. Open the firewall page.

  4. Allow incoming traffic from a specific IP address:

    4.1.Open the Inbound traffic tab.

    4.2.If you have already added rules, view the firewall status. Make sure that the firewall has the status APPLIED.

    4.3.In the menu of the rule list, select Edit rule list.

    4.4.Click Add rule.

    4.5.In the Traffic field, select Inbound.

    4.6.In the Action field, select Accept.

    4.7.In the Source address field, enter the IP addresses from which requests can be accepted.

    4.8.Click Create rule.

  5. Allow all outgoing traffic:

    5.1.Open the Outbound traffic tab.

    5.2.Click Add rule.

    5.3.In the Traffic field, select Outbound.

    5.4.In the Action field, select Accept.

    5.5.Click Create rule.

  6. Click Activate list. When the rules are activated, the firewall status will change to APPLIED. If you do not activate the list, the rules will be reset.

Allow traffic only from a specific IP address and ports

  1. In the Control panel, in the top menu, click Products and select Dedicated Servers.

  2. Go to the Basic firewall section.

  3. Open the firewall page.

  4. Allow incoming traffic from a specific IP address and ports:

    4.1.Open the Inbound traffic tab.

    4.2.If you have already added rules, view the firewall status. Make sure that the firewall has the status APPLIED.

    4.3.In the menu of the rule list, select Edit rule list.

    4.4.Click Add rule.

    4.5.In the Traffic field, select Inbound.

    4.6.In the Action field, select Accept.

    4.7.In the Source address field, enter the IP addresses from which requests can be accepted.

    4.8.In the Source port field, enter the ports or port range from which requests can be accepted.

    4.9.Click Create rule.

  5. Allow all outgoing traffic:

    5.1.Open the Outbound traffic tab.

    5.2.Click Add rule.

    5.3.In the Traffic field, select Outbound.

    5.4.In the Action field, select Accept.

    5.5.Click Create rule.

  6. Click Activate list. When the rules are activated, the firewall status will change to APPLIED. If you do not activate the list, the rules will be reset.

Deny traffic from a specific IP address

  1. In the Control panel, in the top menu, click Products and select Dedicated Servers.

  2. Go to the Basic firewall section.

  3. Open the firewall page.

  4. Deny incoming traffic from a specific IP address:

    4.1.Open the Inbound traffic tab.

    4.2.If you have already added rules, view the firewall status. Make sure that the firewall has the status APPLIED.

    4.3.In the menu of the rule list, select Edit rule list.

    4.4.Click Add rule.

    4.5.In the Traffic field, select Inbound.

    4.6.In the Action field, select Deny.

    4.7.In the Source address field, enter the IP addresses from which requests are blocked.

    4.8.Click Create rule.

  5. Allow remaining incoming traffic:

    5.1.Open the Inbound traffic tab.

    5.2.Click Add rule.

    5.3.In the Traffic field, select Inbound.

    5.4.In the Action field, select Accept.

    5.5.Click Create rule.

  6. Allow all outgoing traffic:

    6.1.Open the Outbound traffic tab.

    6.2.Click Add rule.

    6.3.In the Traffic field, select Outbound.

    6.4.In the Action field, select Accept.

    6.5.Click Create rule.

  7. Check the incoming traffic rule order: in this example, the deny rule should be first, and the allow rule should be second.

  8. Click Activate list. When the rules are activated, the firewall status will change to APPLIED. If you do not activate the list, the rules will be reset.

Deny traffic from specific ports

  1. In the Control panel, in the top menu, click Products and select Dedicated Servers.

  2. Go to the Basic firewall section.

  3. Open the firewall page.

  4. Deny incoming traffic from specific ports:

    4.1.Open the Inbound traffic tab.

    4.2.If you have already added rules, view the firewall status. Make sure that the firewall has the status APPLIED.

    4.3.In the menu of the rule list, select Edit rule list.

    4.4.Click Add rule.

    4.5.In the Traffic field, select Inbound.

    4.6.In the Action field, select Deny.

    4.7.In the Source port field, enter the ports or port range from which requests are blocked.

    4.8.Click Create rule.

  5. Allow remaining incoming traffic:

    5.1.Open the Inbound traffic tab.

    5.2.Click Add rule.

    5.3.In the Traffic field, select Inbound.

    5.4.In the Action field, select Accept.

    5.5.Click Create rule.

  6. Allow all outgoing traffic:

    6.1.Open the Outbound traffic tab.

    6.2.Click Add rule.

    6.3.In the Traffic field, select Outbound.

    6.4.In the Action field, select Accept.

    6.5.Click Create rule.

  7. Check the incoming traffic rule order: in this example, the deny rule should be first, and the allow rule should be second.

  8. Click Activate list. When the rules are activated, the firewall status will change to APPLIED. If you do not activate the list, the rules will be reset.