Description
This check ensures that every Linode Cloud Firewall has at least one explicit inbound rule. Defined inbound rules state which traffic is allowed or blocked (protocols, ports and addresses) instead of relying only on the firewall's default inbound policy. Each firewall is evaluated separately.
Rationale
A firewall with no inbound rules depends entirely on its default inbound policy. If the policy is DROP, nothing can reach the Linodes, including required services; if it is ACCEPT, everything can reach them. Explicit inbound rules document which services are meant to be reachable and from where, which makes the firewall easier to review and audit.
Impact
Rules take effect only after Save Changes is clicked, and then apply at once to all attached devices
A wrong rule can block required traffic or open a port to the internet. Review each rule before saving
This check only counts the rules. A firewall with any inbound rule passes, even if the rule is too open, so the rules must still be reviewed for least privilege
Default Value
A new Cloud Firewall created as a Custom Firewall has no rules. A firewall created From a Template contains the rules of that template.
Pre-Requisites
A Cloud Manager user with read/write access to the firewall
A list of the inbound traffic that must be allowed or blocked (protocol, ports, Sources)
For the CLI test plan: a Personal Access Token created by an unrestricted user with Firewalls: Read Only scope
Remediation
Test Plan
Console:
Sign in to Cloud Manager at https://cloud.linode.com.
In the sidebar, under Networking, click Firewalls and select the firewall.
On the Rules page, check the list of inbound rules. If no inbound rule is listed, the firewall fails.
Repeat for each firewall.
CLI:
Set the token:
export LINODE_TOKEN="<your-personal-access-token>"
List every firewall with the number of inbound rules:
curl -s -H "Authorization: Bearer $LINODE_TOKEN" "https://api.linode.com/v4/networking/firewalls?page_size=500" | jq '.data[] | {id, label, inbound_rules_count: (.rules.inbound | length), inbound_rules: [.rules.inbound[] | {label, action, protocol, ports}]}'
A firewall passes if inbound_rules_count is 1 or more and fails if it is 0.
Implementation Steps
Console:
Sign in to Cloud Manager at https://cloud.linode.com.
In the sidebar, under Networking, click Firewalls and select the firewall that failed the check.
On the Rules page, click Add An Inbound Rule.
Fill in the rule:
Label: a short name, for example allow-https,
Protocol: TCP, UDP or ICMP,
Ports: the port or ports (not used for ICMP),
Sources: only the addresses that need access, not all IPs where possible,
Action: Accept or Drop.
Click Add Rule.
Add any other rules needed and drag them into the right order (rules are applied from top to bottom).
Click Save Changes.
Repeat for each firewall that failed the check.
Backout Plan
Sign in to Cloud Manager at https://cloud.linode.com.
In the sidebar, under Networking, click Firewalls and select the firewall.
On the Rules page, click Delete next to the rule that was added.
Click Save Changes.
Reference