Firewalla Rules can be used to manage access control traffic on your network and devices. The targets for the rules can be Applications, Target Lists, Categories (gaming, adult, video), Network flows (IP, domain, port), regions, Internet, or Local Network.
- Definition of Rules
- Rules List
- Default Rules
- Create a Rule
- Rule Shortcut
- Pause/Delete a Rule
- Add/Remove Rules at the Device Level
- Block from Alarms
- Rule Stats
- Layered Logic in Rules
- Direction in Rules
- Managing Network Segments with Rules
- How to troubleshoot blocked sites
- How to block applications using rules
- Limiting Access over VPN with Rules
Definition of Rules
A rule defines how you want to control network access for one or more devices. A rule has four basic elements: action, target, device, and schedule. It can be interpreted as the following:
Take an action on matching target(s) and apply to device(s)
following a schedule
For example, if you want to block YouTube access on Kids' Laptop between 7-9 PM every day, you define a rule like this:
Action: block
Target: YouTube
Device: Kids' laptop
Schedule: 7-9pm daily
Rules List
All user-defined rules are shown on the Rules screen under Home > Firewalla > Rules. Rules can be created as above, or when you use the control buttons on the device home screen, such as blocking/allowing all gaming sites, a rule will be automatically created and appear on the Rules list.
Default Rules
If you are running your unit in router mode, Firewalla will by default insert an Ingress Firewall blocking anything that attempts to intrude into your network. Please do not delete or pause this rule.
In addition to the default ingress firewall, Firewalla will set some default rules through Active Protect, our built-in Intrusion Detection/Prevention Service. Active Protect automatically detects, blocks, and alerts you of suspicious connections. Read more about Active Protect.
Create a Rule
To create a new rule, go to the Home screen > Firewalla > Rules > Add Rule. You'd need to specify the following:
1. Action
Action can be one of the following:
- Allow
- Block
Allow rules at the same level will always take precedence over Block rules and Ad Block features. When applied, these rules are like exceptions to blocking rules, which apply to everything (Learn more about the direction in allow rules).
However, Allow rules do not override the Family Protect (3rd party) and Safe search features.
2. Target and Target Category
You can choose target(s) to allow/block based on one or a combination of the following items:
- Application
- Target List
- IP Address
- Range of IP Address
- Domain name
- Remote port
- Local port
- Region
- Local Network (Firewalla Gold and Purple only)
- Internet (all internet sites)
Application: The App list is sorted alphabetically, and it will be continually updated. Only blocking rules are supported when matching Applications.
Target List: You can create a list of domains or IPs and then use that list to allow or block all of the items in that list. See Target Lists for more details.
Domain Name: You can define the target as a domain (e.g., abc.com) or subdomain (e.g., x.abc.com).
- When you block a domain, all subdomains and IP addresses mapped to the domain and subdomains are blocked as well. (e.g., "google.com" would also block "images.google.com")
- Blocking TLD (top-level domain) can be done by using the wildcard notation, such as blocking all *.adult or *.country (e.g. "*.ru")
- There are two Block Modes when blocking a domain:
- Default: If two different domains map to the same IP address, then blocking one would cause the other, seemingly unrelated domain to be blocked as well.
-
Domain-Only: Less restrictive option won't accidentally block other domains hosted on the same IP. Still, some applications may access servers by IP address rather than domain, so the rule may not work as intended.
Learn more about Block Mode.
IP Range: You can define a group of IP addresses by specifying an IP range in CIDR notation (e.g. 192.168.100.14/24)
Remote Port: Think of this as egress or outbound traffic. You can block/allow certain applications outbound access using a port or a range of ports. For example, blocking remote ports 6881-6889 will block p2p traffic (typical p2p traffic uses these ports).
You can also create Rules matching the combination of a Domain/ IP address / IP range and Remote Ports. Specifying protocol is also supported. If no protocol is specified both will be included.
This is often be done in combination of a "Block all traffic" rule with an Allow rule a specific port.
Local Port: Think of this as ingress or inbound traffic. You can block/allow others from accessing local services by specifying Local Port + Remote Target. For example, if you have a web server running, you can now create a rule to allow traffic from any region to access a certain port on your web server.
Local ports can also be used to allow or block traffic matching port(s) from local networks
on device(s) by LAN, Group, or device).
Local Network: On Firewalla Gold or Purple series boxes, you can block traffic between local networks by selecting any local network -> Traffic from/to the local network, then apply the rules to another network or device.
Here are more details on How to use rules to segment your network.
Internet Block: You can block traffic from the Internet, to the Internet, or both from and to the Internet.
By default, Internet blocking only blocks IP connections. Your DNS requests will still be resolved, but the traffic will be blocked at the IP level. However, if you want to block all DNS requests to ensure no connection would bypass the blocking unless you specifically allow them, you can select the DNS Blocking option for rules matching "Traffic from & to Internet" or "Traffic to Internet".
Target Category
You can also choose from a set of system-managed target categories. The following categories are supported:
- Gaming
- Social
- Video
- Porn
- P2P
- Gambling
- Shopping
- VPN
Each category contains a list of domains or IP addresses associated with specific types of activities. Firewalla automatically populates the list in each category by learning the traffic in your network, but you can also view and edit the list manually.
The list of target categories can be found on the Target screen. Tap on the "i" icon next to a category, and you will see all its included targets. Tap on "+" to add a new target, or tap on an item to see the delete option.
For example, you've blocked "All Video Sites" for your phone, but the iTunes Apple store is automatically included. If you want to be able to access the iTunes Apple store, you can simply remove this destination from the All Video Sites category.
3. On
Once you've defined the target, you can choose which device(s) to apply the rule. You can select:
- a single device
- a device group
- a network segment (Firewalla Gold and Purple series boxes only)
- or all devices
4. Schedule
The active time of a rule can be set as:
- "Always" (never expires unless deleted)
- "One-Time-Only" (expires after configured time)
- Recurring following a daily or weekly schedule
For example, if you want to block Kids' Laptop from accessing Facebook every weeknight from 9 PM to 7 AM (the next day), you can create a new rule:
- Block
-
Target: "domain" -> "facebook.com"
- block mode: Default
- Device: Kids' Laptop
- Schedule: "every week, Monday through Friday, from 9 PM to 7 AM (next day)"
If you want to add more details about your rule, such as why it was created or when it should be turned off, you can do so in the Notes text field.
Rule Shortcut
You can add a rule to your box's main screen to quickly activate or pause it with one tap. Just tap on your rule from the Rules list, then scroll down and tap Add to Main Screen. You'll see the rule appear above any recent/pinned devices. Tap the switch to pause or resume the rule.
Note that only one rule can be added to the main screen at a time. Additionally, the on/off status of the switch only indicates whether the rule is paused or not. Scheduled rules are still only active during their scheduled time.
Pause/Delete a Rule
You can pause a rule from the rules detail screen. Pause is useful when you'd like to temporarily disable the rule without having to delete or reschedule the rule.
To customize the duration when pausing rules, tap into your rule and scroll down to Pause Rule. Tap Custom and choose either Pause For... or Pause Until..., select either a time duration or a time at which to resume the rule, and tap Done. A rule can also be paused for "Today," which means it will be paused until the end of the day. See our video tutorial for detailed instructions.
"Always Pause" will keep the rule in place, but it will be inactive until you Resume it.
To delete a rule, tap Delete on any rule's detail page. A deleted rule cannot be recovered or reactivated and has to be created from scratch if you need it again.
Manage Rules at the Device/Group/Network Level
You can easily block/unblock internet access for a device. On the device detail screen, there is a set of control buttons. You can block all internet access on this device or only block certain categories of access (e.g., Games, Social, Video activities).
Depending on if a target is being actively blocked, you can use the control buttons to either block or pause a block for 30 minutes, 1 hour, a custom amount of time, or permanently.
All blocking rules activated by the control buttons will also appear on the Rules page. You can also create additional rules on this device by tapping the "+" icon.
Block Rules Created from Alarms
When you receive an alarm, you'll see an option to "Block" under the alarm summary. Depending on the type of alarm, you may see multiple options under Block. In the following example, you can either block the specific domain or the type of activity (Gaming) altogether. Depending on your selection, a new rule will be created. You can view and manage the rule on the Rules screen.
Rule Stats
To help you better understand how effective your rules are, we show you statistics about how many flows are hit by a certain rule. On the main rules page, you'll see a summary bar at the top of the Rules page showing you the total hit count of all Allow and Block rules. Individual rule hit counts are also displayed on the rules list.
Additionally, there is a rule stats section for each rule. In addition to telling you how many flows have triggered the rule, this section also shows when the last hit happened. You can tap on the "Reset Hit Count" text button to reset the stats for each rule separately.
Note: If you do not have any port forwardings set up, all incoming requests will be blocked before checking rule hit count, causing the hit count for your blocking rule matching Traffic from Internet to be 0.
Layered Logic in Rules
Network access to or from a particular device can be determined by multiples rules defined at different layers:
- Rules for the device itself
- Rules for the Group that includes the device belongs to, if any
- Rules for the network segment where the device is connected (Firewalla Gold and Purple series boxes only)
- Global rules apply to all devices
A network segment is a special device group. Its group membership is dynamic based on connectivity. Rules defined for a network segment will apply to devices connected to that segment. If a device leaves network, "LAN" and joins network, "IoT" rules for network, "LAN" will no longer apply to this device but any rules defined for network, "IoT" will apply.
Device group membership is static. Group rules apply to all member devices regardless of which network segment the device is connected to.
To avoid messing up the whole network by mistake, it only supports applying internet blocking on some devices.
Rules Logic
The logic for rules processing is the following:
- All previously defined device-level rules will be removed when a device joins a group. The device will adopt the rules defined at the group level (block rules can still be created at the device level from alarms and network flows).
- If a device leaves one Group and joins another, the rules for the new Group apply.
- A device or device group will inherit the Network and Global rules if there is no conflict.
When there is conflict between rules:
The priority of different levels is Device > Group > Network > Global. Meaning when there is a conflict:
- Device/Group rules take precedence over network rules.
- Network rules take precedence over Global rules.
- At the same level, allow rules take precedence over block rules.
One exception: With the exception of the Ingress Firewall rule, all BLOCK rules on inbound traffic (e.g. region blocks) always have priority over inbound ALLOW rules (e.g. port forwarding). For example, if you have a Region block it will prevent a connection from the blocked region even though port forwarding is enabled.
Examples
- If you have a rule that allows a domain on All Devices but another rule that blocks the Internet on a specific device, that device will not be able to access that domain. The priority here is Device > Global (All Devices).
- On a device, if you have one rule that allows company.com and another rule that blocks Internet, that device will still be able to access company.com because that domain is allowed even though Internet is blocked. This could be used to limit a device to only access certain sites during school or work hours for example. The priority is Allow > Block on the same level.
- If a network has a rule to block All Gaming Sites, then all devices in the network will have games blocked because devices inherit rules from the network it belongs to when there is no conflict.
- If a network has a rule to block All Gaming Sites, but a device (or a device group) in that network has a rule to allow nintendo.com, that device can play games on nintendo.com. When there is a conflict, the priority is Device > Network.
- If a network has a rule to block Traffic from the US, but a device in that network has a rule to allow Traffic from the Internet on a local port, US traffic can't connect to that device via that port.
WARNINGS
- If you block a domain in default mode, other domains may also be blocked due to both domains being hosted at the same IP. You can find more details here: How does Firewalla block domains?
- Please be careful when you block Regions. The Internet and its data centers are distributed across the world.
Example: "firewalla.com" is based on Shopify, and Shopify is in Canada. Since many shops use Shopify, you will likely need help shopping if you block Region: Canada. - Port-based and Regional targets are fairly large. Please try not to use them to "allow" or give an exception to your rules. Please take a look at this article for a better way to do port opens.
- Allow rules are always like exceptions. For example, if you block YouTube and ALLOW the USA region, the YouTube block will not take effect since Youtube is in the USA, which is an exception.
Direction in Rules
Firewalla allows directional ALLOW rules. The direction for allow rules can be:
- Outbound only: This is the default setting. It allows traffic from your devices to the target, but not the other way around.
- Bi-directional: It will allow all traffic between the target and your local device. If a rule is set to bi-directional, others from outside your network can access your local devices. This may increase security risks, so if you are unsure about it, we recommend using the default setting.
Blocking rules are bi-directional unless specified in Internet or Local Network targets.
Managing Network Segments with Rules
Network segmentation is one way to increase your network's security and performance. You can use network segments to restrict communication between devices, create a secure guest network, and securely connect to your home network while remote. After your network is segmented, you can apply rules and policies to each subnetwork. Subnetworks can fully see and talk to each other by default, so you may find it useful to restrict what parts of the local network they have access to by setting Block rules for traffic on other local networks.
You can also:
- Use the Smart Queue feature to prioritize traffic on certain segments.
- Use the route feature to specify how traffic moves over each segment.
Limiting Access over VPN with Rules
You can also give a remote device limited access over VPN. For example:
- Block all access for the VPN profile to local networks. If you have several devices that will use the same pattern you could apply this rule to all WireGuard profiles instead of a single Profile.
- Allow access to the IP of the specific device you want to allow access to and you can optionally set a specific port (RDP in the example below). If you use this approach, you should also set an IP reservation for the target device.
Note, this works best with WireGuard because each WireGuard profile is specific to a single device.
Similarly, you could limit VPN access to just specific LANs or VLANs as needed.
Comments
49 comments
Is the RED's rules only limited to 999?
UPDATE:
See firewalla's update on this below.
I believe that people should be aware that because domains are IP based, they should not assume that, "company.com" will cover, "support.company.com". If they want to block (or allow) that they must specify the subdomain they are targeting.
The tutorial would be better if there were more detail like this.
Are there any plans to support URL based rules? I'd like to allow access to certain domains but restrict certain paths within those domains, e.g. allow everything from foo.com except foo.com/register, foo.com/user, foo.com/forum, etc.
URL rules are not possible without unwrapping https sessions. This is something at the moment, we don't want to mess with us. Doing anything with https is to break end to end trust, and that is something philosophically is bad.
Ah, understood. Good policy!
is there a way to combine rules filters in a single rule(as opposed to layered)?
for instance:
Not sure if I missed how to do this, but is there an ability to do wildcard allowing? Such as allow "*.google.com" to catch all Google Classroom URLs?
bks
@brian I think domains are io based right now and there is no wildcard support. I would really like to have that! Nest devices have really long sub domains that look like they could change without notice.
@Brian, @Michael,
1. Domain blocking now use both ip-based and dns-based blocking. You can change to domain-based only in Rule UI.
2. the allow and block priority is a little complicated when taking scope (device, group, network, global) and sub domain (*.google.com) into consideration.
first priority: scope (device > group > network > global)
second priority: sub domain (longest domain suffix takes priority, e.g. www.google.com > *.google.com)
third priority: allow > block
We are trying to simplify this in the app so that you don't have to worry about this in the most of time. (appreciate any feedback/idea on this)
So:
- if you don't specify blocking a specific google.com domain, allowing "*.google.com" should work.
- when you block a category (such as video), it equals to blocking each specific video site, such as xyz.googlevideo.com. and allowing "*.googlevideo.com" won't work, because xyz.googlevideo.com takes priority.
Thanks @Firewalla. So are:
google.com = *.google.com ? Or does google.com only refer to the second-level domain name?
I notice that rules applied to all devices don't show up when you look at the rules for a device. I would advocate that all rules that affect a device should be shown or this is a recipe for customers to be confused which could cause support issues.
I have the same question as Michael.
The app shows google.com if I input *.google.com as the domain I want to allow.
@Brian, I noticed that too. Hopefully that means the second level domain includes all subdomains. I’d love to hear @firewalla confirm though.
Hello I am on firewalla gold. Wanted to achieve , for a specific device with some ports mapped, that only some geographic regions can access it. I tried this first :
1) rely on the pre-filled global rule to deny traffic from internet to all devices in the lan ;
Create device specific rule to allow traffic from my preferred geographic region to the device
1) didn’t work as traffic from other geographic regions were still making it to the device , so I tried :
2) add a device specific rule to block all traffic from internet, add a rule to allow traffic from one geographic region
Why did 1) not work and 2) seems to work just fine?
Hi
See the last section, the device rules take precedence over global rules
Quote here:
the priority of different levels are device > group > network > global.
At the same level, allow rule takes precedence over the block rule.
Hi yes I have checked that - so why doesn’t the GLOBAL block rule block all traffic and the device level allow rule on one single country doesn’t allow just that country? I have double checked the sequence of priorities you quote above many times and I still don’t understand why is my point 1) not working :
A) add a rule to block all traffic from internet for All Devices (global scope)
B) add a rule to allow traffic from e.g. Canada for the one device “Test”
Given the two rules above, my understanding is that I should have that for the specific device “test” all incoming traffic was blocked with the exception of Canada one. However what actually happens is that all traffic is allowed regardless of the geographic origin, as if the global rule at point A was ineffective.
Do you imply maybe that global scoped rules and device (or network level rules) cannot be merged if they partially conflict and the less privileged scope is disregarded altogether?
If I'm not mistaken, the diagnostics (Rules > Diagnostics) Can only test Device > WAN connections. But it would be useful to be able to test external > LAN connections as well now that the Rules allow so much more control.
i'm trying to set a filter based on TLD, but the box turns red and doesn't accept the input... Am I doing something wrong?
I'm trying to filter *.io
*.io works for me. There can be a delay before it kicks in
https://help.firewalla.com/hc/en-us/articles/360008521833-Manage-Rules
Maybe we're not on the same HW or FW version? (Mine is firewalla gold, app version 1.44.2...
When I put *.io in the box for the rule, the box turns red and I can't submit the rule.. Seems there is form validation rule that's not happy with what I put...
[Edit] figured it out, behaviour is different between the phone app and the web app. *.io doesn't work as a target on the web app, but it does on the phone app...
Hello,
For firewalla gold, may i ask is there any default firewall rules in place?
Do we need to specify below rules? Thank you.
e.g.
Deny:
From: Public Internet, WAN
to: LAN
Allow:
From: LAN
to: Public Internet, WAN
If you have a virgin Gold (out of the box, no configuration)
Firewalla by default will block all connections originated outside your network to your network. And Allow all traffic originated from LAN to WAN.
"Active protect" will block both directions if the site has a bad reputation.
@firewalla and a virgin FWG will also block between vlans, including mDNS reflection, correct?
A new FWG
mDNS is always on, and there are no other active rules that block VLANs or LANs unless you specifically add them.
Thanks @Firewalla.
So mDNS cannot be blocked at all? Or it is just open by default?
Hello. If I have a specific IP address of another person's computer, can I block it? Both incoming and outgoing traffic. I see the IP address option in the picture. Just want to know if it's possible.
@Bruce, As I’m sure you know, each computer has a LAN IP and a WAN IP. Firewalla will never see the LAN IP a of a computer on another network. You can block a WAN IP however, many connections are from DHCP IPs so a person’s IP a address today won’t necessarily be their IP tomorrow.
That said, yes, Firewalla van block an IP address, and IP range, or domains. But by nature, IP addresses may not reliably block a specific person.
You list rule priorities of Device > Group > Network > Global, however on my Gold, once i put a device into a group I cannot setup rules specifically for that device. It only will allow me to specify the group. Am I doing something wrong?
Devices in a group cannot have their own rules.
Please sign in to leave a comment.