Description
This check ensures that the default outbound policy of every Linode Cloud Firewall is set to DROP. The default policy decides what happens to outbound traffic that does not match any rule. With DROP, only traffic that is explicitly allowed by a rule is permitted. Each firewall is evaluated separately.
Rationale
With an outbound policy of ACCEPT, a compromised Linode can connect to any destination on the internet. Attackers use this to download more malware, connect to command-and-control servers and send stolen data out. A default-deny (DROP) outbound policy limits outgoing connections to approved destinations only.
Impact
After the change, all outbound traffic that is not allowed by a rule is blocked
Common outbound traffic must be allowed with rules first, for example DNS (TCP/UDP 53), NTP (UDP 123), package updates (TCP 80/443) and any external APIs or databases the applications use. Otherwise updates, time sync and application calls will fail
Outbound rules apply to Linodes only, not to NodeBalancers
The change applies at once to all Linodes attached to the firewall
Default Value
When a new Cloud Firewall is created in Cloud Manager, the Default Outbound Policy is Accept, so this check fails for new firewalls until the policy is changed.
Pre-Requisites
A Cloud Manager user with read/write access to the firewall
A list of the outbound traffic the Linodes need (protocols, ports and destination IP addresses), so allow rules can be added before switching to DROP
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 Outbound Policy dropdown. If it shows Accept, the firewall fails.
Repeat for each firewall.
CLI:
Set the token:
export LINODE_TOKEN="<your-personal-access-token>"
List every firewall with its default outbound policy:
curl -s -H "Authorization: Bearer $LINODE_TOKEN" "https://api.linode.com/v4/networking/firewalls?page_size=500" | jq '.data[] | {id, label, outbound_policy: .rules.outbound_policy}'
A firewall passes if outbound_policy is "DROP" and fails if it is "ACCEPT".
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, review the outbound rules. For each type of traffic the Linodes need, click Add An Outbound Rule, fill in Label, Protocol, Ports, Destinations and set Action to Accept, then click Add Rule.
Set the Outbound Policy dropdown to Drop.
Click Save Changes.
Test that the applications on the attached Linodes still work.
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, set the Outbound Policy dropdown back to Accept.
Click Save Changes.
Reference