On izCloud, rules are written in the panel with a wizard and applied to the firewall automatically. In the source and destination fields you pick address objects instead of typing IPs, so the same object can be used in several rules.
Before you start
- An izCloud service with a firewall, selected in the panel
- Permission to create rules (the account owner, or a sub-user with manage permission in the firewall module)
- A private network and at least one server. This guide uses the server 10.1.0.10 on the 10.1.0.0/24 network
What is a firewall rule?
A firewall rule decides whether traffic from a given source to a given destination on a given port is accepted. A rule answers six questions: in which direction, from whom, to whom, which service, what to do, and whether to log.
The firewall tracks sessions. The reply traffic of a connection you accept does not need its own rule. Traffic that matches no rule is denied.
Where do you add a new rule?
You open the rule wizard with the "New Rule" button on the "Infrastructure → Firewall → Firewall Policy" page. The page shows the rule list and has the "Total Rules" (with "Active Rules" and "Inactive Rules" inside it), "Rules with NAT" and "Last Change" counter cards. The wizard opens in the "New Firewall Rule" window.
If the service has no firewall, the panel shows the message "No firewall on this service". If no service is selected, the warning "Please select a service first." appears.
- Select the service from the Active Service card at the top of the side menu.
- Open the "Infrastructure → Firewall → Firewall Policy" page.
- Click the "New Rule" button.
Step 1: How do you fill in General?
In the first step you set the rule name, the action and the direction of the traffic. The direction is defined by two interfaces: the side the traffic enters from and the side it leaves to.
- Type a name in the "Rule Name *" field. Example: ofis-ssh.
- Select "ACCEPT" as the "Action".
- Select WAN as the "Incoming Interface (From)".
- Select your network as the "Outgoing Interface (To)".
- If you like, add a short note in the "Description" field.
| Field | What to enter | Rule |
|---|---|---|
| Rule Name * | ofis-ssh | Required, up to 30 characters. Letters, digits, spaces, dots, underscores and hyphens are allowed |
| Description | SSH from the office | Optional, up to 1023 characters |
| Status | Active | Active or Inactive |
| Action | ACCEPT | ACCEPT or DENY |
| Incoming Interface (From) | WAN | Required (Interfaces *). The side the traffic comes from |
| Outgoing Interface (To) | web-ag | Required (Interfaces *). The side the traffic goes to |
| Tags | ssh | Optional, up to 10 tags, each up to 32 characters |
Step 2: How do you choose the Source and Destination?
In the source and destination fields you do not type single IPs. You choose an address object or an address group. Both fields need at least one selection.
On the WAN side you can choose internet addresses and "all". On your own network you choose "all" or addresses inside that network. Local (private) addresses are not used on the WAN side.
- In the Source field, choose "Address Object" or "Address Group".
- If it is not in the list, create the object with the "New address" button in the list. Example: ofis-ip, Single IP, 198.51.100.20.
- In the Destination field, choose the server's address object. Example: web-sunucu, Single IP, 10.1.0.10.
How do you create an address object?
An address object is a name given to an IP address or a range. You create it on the "Infrastructure → Firewall → Addresses" page. The wizard has four steps: "General → Address Definition → Additional Settings → Summary".
There are four types. "Subnet" defines a network in CIDR form. "Single IP" defines one address. "IP Range" defines a range of up to 65,536 addresses. "FQDN" defines a domain name and accepts wildcards such as *.example.com.
An address object name can be up to 60 characters and cannot be changed after it is created. An address object that is in use cannot be deleted, and the panel lists the rules that use it. You can group several objects under an "Address Group".
Step 3: How do you choose Services and Applications?
The service sets which port and protocol the rule covers. You must choose at least one service. If you choose "ALL", only "ALL" stays selected.
If the service you need is not in the list, use "Add custom port" to define a port or range for TCP or UDP. A range is written like 8000-8100.
- Choose the SSH service from the list. If it is not there, click the "Add custom port" button and set the protocol and port in the "Custom port service" section.
- Select TCP as the protocol.
- Type 22 in the port field and click "Add".
Step 4: Security Profiles
This step is optional: the IPS, WAF and SSL inspection profiles can be used only if you have a subscription, and they are not covered in this guide. If you have no subscription, skip the step and continue with "Next".
Step 5: How do you set NAT and Logging?
Leave NAT off on rules that accept incoming traffic. The "NAT (source address translation)" option in this step is for outgoing traffic and exists only on ACCEPT rules. DENY rules have no NAT.
Logging has three options: "All sessions", "Security events only" and "Off". The default is "All sessions". Keep it on while you test a new rule.
- Leave the NAT option off.
- Select "All sessions" for "Logging".
Step 6: Summary and saving
The last step shows a summary of the rule. You check the fields and click the "Save" button. You move between steps with the "Back" and "Next" buttons. If saving succeeds, the message "Rule created." appears.
- In the Summary step, check the source, destination, service and action.
- Click the "Save" button.
Example scenario: SSH from the office, HTTPS from the internet
Your web server is at 10.1.0.10. You want to accept SSH only from the office IP (198.51.100.20) and allow HTTPS traffic from the internet. You write two rules.
| Field | Rule 1: ofis-ssh | Rule 2: web-https |
|---|---|---|
| Action | ACCEPT | ACCEPT |
| Incoming Interface (From) | WAN | WAN |
| Outgoing Interface (To) | web-ag | web-ag |
| Source | ofis-ip (Single IP, 198.51.100.20) | all |
| Destination | web-sunucu (Single IP, 10.1.0.10) | The server's virtual IP (VIP) |
| Service | 22/TCP | 443/TCP |
| NAT | Off | Off |
| Logging | All sessions | All sessions |
How do you know it works?
The rule appears in the list and its status is "Active". An SSH connection to the server can be made from the office IP and cannot be made from another IP.
- The rule shows as "Active" in the Firewall Rules list
- An SSH connection opens from the office IP
- The same connection from a different IP times out
ssh kullanici@203.0.113.10
nc -vz 203.0.113.10 443
Common problems
If you see "Incoming and outgoing interfaces cannot be the same.", choose different interfaces in the From and To fields.
If you see "Local (private) addresses are not used on the WAN side.", you entered a private IP on the WAN side. Choose an internet address or "all" on the WAN side.
At least one side of the rule must be your network. Otherwise the wizard does not accept the entry.
If the rule name is longer than 30 characters, the entry is rejected. Shorten the name.
If you cannot delete an address object or a service, look at which rules use it. An object that is in use cannot be deleted.
If the rule is saved but traffic does not pass, review the source, destination and service. For incoming traffic you also need a virtual IP rule.
Frequently asked questions
How do I open a port on the firewall?
On the "Infrastructure → Firewall → Firewall Policy" page, click "New Rule", set the action to "ACCEPT", choose the source and destination, give the port in the "Services and Applications" step and save.
How do I write a rule for one specific IP only?
First create a "Single IP" address object on the "Addresses" page or with the "New address" button in the wizard. Then pick that object in the source field of the rule.
How long can a firewall rule name be?
A rule name can be up to 30 characters. Letters, digits, spaces, dots, underscores and hyphens are allowed.
Can I use NAT on a DENY rule?
No. The NAT option exists only on ACCEPT rules.
I wrote a rule but the connection fails. Why?
First check the interface direction and the service. To reach a server with a private IP from the internet, you also need to define a virtual IP (DNAT).
Can I add a custom port?
Yes. With "Add custom port" in the "Services and Applications" step you define a TCP or UDP port or port range. Up to 50 custom services can be added per service.