Skip to navigation

Firewalls

A firewall group is a named list of rules that decides which incoming traffic may reach your VMs. You attach the group to one or more VMs, and IBEE checks every incoming packet against its rules before it reaches the VM. Traffic that no rule accepts is dropped, so a VM is closed by default except for the ports you open.

When to use a firewall group

You want to…UseWhy
Allow only some ports or addresses to reach a VM, for example SSH from your office onlyFirewall group (this page)Filters traffic before it reaches the VM, for every VM in the group at once
Add a second layer of filtering, or filter by app or userThe firewall inside the VM (ufw, firewalld, Windows Defender Firewall)Runs in the guest OS; it adds to the firewall group, it doesn’t replace it
Keep a VM off the internet entirelyA VPC with Private onlyThe VM has no public address at all
Open one port on a private VMNAT port forwardingNAT (network address translation) maps a port on the VPC’s shared public address to the VM

Traffic must pass both the firewall group and the firewall inside the VM. If either one blocks a port, the connection fails.

How it works

  1. Rules are checked at the VM’s virtual network port, outside the VM. A dropped packet never reaches the VM.
  2. Firewall groups are stateful. When a rule accepts a connection, the replies to it are allowed automatically. You don’t need rules for return traffic.
  3. Incoming traffic that no rule accepts is dropped. Every group ends with a system rule, “Default deny all other inbound IPv4”.
  4. A drop rule beats an accept rule. If a drop rule and an accept rule both match the same traffic, the traffic is dropped, whatever their order in the list.
  5. Outgoing traffic is allowed. Every group has a system rule, “Allow all outbound IPv4”. The portal shows inbound rules only.

The default firewall group

Every VM is in exactly one firewall group. A new VM goes into the platform’s default group unless you pick one of yours when you deploy it. In the Firewalls list, the default group is marked (default).

The default group accepts these from any address, and drops all other inbound traffic:

PortProtocolUsually used by
22TCPSSH
3389TCPWindows Remote Desktop (RDP)
80TCPHTTP websites
443TCPHTTPS websites
8000–8080TCPApp servers

The default group doesn’t accept ICMP, so ping to a VM in it gets no answer. You can’t edit the default group’s rules or attach VMs to it yourself. To open other ports, or to close the ones above, create your own group and attach your VM to it. Detaching a VM from your group puts it back in the default group.

Before you begin

  • A verified organization. Until it’s verified, creating groups or rules asks you to verify first. See Verify your identity.
  • The VMs you want to protect, in the same workspace.
  • The ports your apps use, and, if you want to limit who can connect, the addresses allowed in. Find your own public IPv4 address by searching “what is my IP” in a browser.
  • For the API: an API token with Firewall permission (firewall.read, firewall.write) and your workspace ID.

Create a group and attach a VM

1

Open Firewalls

In the sidebar, under Network & Security, click Firewalls. The list shows each group’s Name, Description, Rules, Linked Instances and Updated time, 10 groups per page.

2

Create the group

Click Create Firewall Group. In the dialog, enter a Group name (up to 120 characters, for example web-tier) and click Create Group. You see “Firewall group created.”

3

Add rules

Click the group’s name to open it. On the IPv4 Rules tab, add the rules you need. Keep a rule for the way you manage the VM (SSH on port 22 or RDP on port 3389). See Create firewall rules.

4

Attach VMs

Click the Linked Instances tab. Search for an active VM and click Attach. You see “Instance attached to firewall group.” If the VM was in another group, it moves to this one.

Add your SSH or RDP rule before you attach a VM. A new group drops all inbound traffic until you add accept rules, so attaching it first cuts off your own access.

Verify

From a computer outside IBEE, test an open port and a closed one:

nc -vz -w 5 203.0.113.10 22 # open: "succeeded" or "open"
nc -vz -w 5 203.0.113.10 5432 # closed: gives up

-w 5 makes nc give up after 5 seconds. A port the firewall drops waits the full 5 seconds and then fails, instead of being refused at once, because the firewall doesn’t answer. On Windows, use Test-NetConnection 203.0.113.10 -Port 22 in PowerShell.

Manage groups

  • Open a group: click its name. The page shows Group Rules (the number of inbound rules, out of 50) and Linked Instances.
  • Copy the ID: open the group’s menu in the list and click Copy ID. The API calls this the firewall_group_id.
  • Detach a VM: on Linked Instances, click Detach on the VM’s row. The VM goes back to the default group.
  • Delete a group: open its menu in the list, click Delete, type the group’s name in the Delete Firewall dialog, and confirm. The VMs in it go back to the default group. This can’t be undone.
  • Rename a group: the menu shows Rename, but it isn’t available yet.

Use the API

Create a group, add a rule that accepts HTTPS from anywhere, and attach a VM. Replace 710995 with your workspace ID.

# 1. Create the group
curl -X POST "https://api.ibee.ai/v1/networking/firewall-groups?workspace_id=710995" \
-H "Authorization: Bearer $IBEE_TOKEN" \
-H "Content-Type: application/json" \
-d '{"name": "web-tier"}'
# 2. Add a rule (use the firewall_group_id from step 1)
curl -X POST "https://api.ibee.ai/v1/networking/firewall-groups/FIREWALL-GROUP-ID/rules?workspace_id=710995" \
-H "Authorization: Bearer $IBEE_TOKEN" \
-H "Content-Type: application/json" \
-d '{"protocol": "tcp", "port_start": 443, "action": "allow", "remote_targets": ["0.0.0.0/0"], "description": "HTTPS"}'
# 3. Attach a VM
curl -X POST "https://api.ibee.ai/v1/networking/firewall-groups/FIREWALL-GROUP-ID/attachments?workspace_id=710995" \
-H "Authorization: Bearer $IBEE_TOKEN" \
-H "Content-Type: application/json" \
-d '{"vm_id": "VM-ID"}'
TaskOperation
List groupsGET /networking/firewall-groups (10 per page by default; limit up to 100, and offset)
Get or delete a groupGET or DELETE /networking/firewall-groups/FIREWALL-GROUP-ID
Add, change or delete a rulePOST .../rules, PATCH or DELETE .../rules/RULE-ID
List, attach or detach VMsGET or POST .../attachments, DELETE .../attachments/VM-ID

In the API, the portal’s accept is allow. The API also accepts outbound rules ("direction": "egress"; egress means traffic leaving the VM), a rule priority, and "enabled": false to switch a rule off; the portal doesn’t show these.

Limits

ItemLimit
Groups per VM1 at a time
Group name1–120 characters, unique in the workspace
Inbound rules per groupThe group page counts them out of 50
ProtocolsAny, TCP, UDP, ICMP
Ports1–65535, one port or a range per rule
AddressesIPv4 only; IPv6 rules are “Coming soon”
When a change appliesAs soon as Save (or Attach) finishes, on every VM in the group

Security tips

  • Open only the ports you use. Every open port is a way in.
  • Limit SSH and RDP to known addresses, such as your office or VPN, with a Custom source.
  • Keep databases off the internet. Don’t open 3306 or 5432 to Anywhere; allow only your app servers’ addresses, or keep the database in a VPC.
  • Review groups regularly, and remove rules and VMs you no longer need.

Troubleshooting

You seeWhat it meansWhat to do
A connection times out after you attach a new groupThe group has no accept rule for that portAdd an accept rule for the port, or detach the VM to go back to the default group.
The port is open in the group but the connection is still refused or times outThe firewall inside the VM blocks it, or nothing listens on the portCheck sudo ufw status or sudo firewall-cmd --list-all, and sudo ss -tlnp to see what listens.
ping gets no answerICMP isn’t acceptedAdd an accept rule with protocol ICMP.
Traffic is still blocked although an accept rule matchesA drop rule also matches, and drop winsRemove or narrow the drop rule.
The VM can’t be found under AttachOnly active VMs in this workspace are listedStart the VM, or switch to the workspace it’s in.
No Attach or Detach buttonsYou opened the default groupAttach VMs to one of your own groups instead.
”A firewall group with this name already exists.”Names must be unique in the workspace (upper and lower case count as the same)Choose another name.
”Firewall group creation failed”The request failedTry again. If it repeats, contact support.
”Firewall group deletion failed”The deletion didn’t completeRefresh the page and try again. If it repeats, contact support.