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), or regions, Internet, or Local Network.
- Definition of Rules
- Rules List
- Create a Rule
- Pause / Delete a Rule
- Add/Remove Rules at Device Level
- Block from Alarms
- Layered Logic in Rules
- Direction in Rules
- How to troubleshoot blocked sites
- How to block applications using 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 Melvin's laptop between 7-9 PM every day, you define a rule like this:
Device: Melvin's laptop
Schedule: 7-9pm daily
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 block/unblock all gaming sites, a rule will be automatically created and appear on the Rules list.
Create a Rule
To create a new rule, go to the Home screen → Firewalla → Rules → Add Rule. You'd need to specify the following:
Action can be one of the following:
Allow rules 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 mode blocked sites 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:
- Target List
- IP Address
- Range of IP Address
- Domain name
- Remote port
- Local port
- 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
- There are two settings:
- 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 but some applications may access servers by IP address rather than domain so they rule may not work as intended.
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: You can block/allow certain applications using a port or a range of ports. For example, block 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.
Local Port: 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 Network: On Firewalla Gold, You can block traffics 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 (Gold only).
You can also choose from a set of system-managed target categories. The following categories are supported:
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, you will see all targets included in the category. 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.
Once you've defined the target, choose which device(s) to apply the rule. You can select:
- a single device
- a device group
- a network segment (Firewalla Gold and Purple only)
- or all devices
The active time of a rule can be set as "Always" (never expires unless deleted), "One-Time-Only" (expires after configured time), or recurring following a daily or weekly schedule.
For example, if you want to block Melvin's iPhone from accessing Facebook every weeknight from 9 PM to 7 AM(next day), you can create a new rule:
- target: "domain" -> "facebook.com"
- apply to: Melvins-iPhone
- schedule: "every week, Monday through Friday, from 9 PM to 7 AM (next day)"
Pause / Delete a Rule
You can pause a rule from the rules detail screen. Pause is useful when you want to temporarily disable the rule without having to delete or reschedule the rule.
To customize the duration when pausing rules, tap Pause Rule -> Custom… -> pick any duration -> tap Done. A rule can also be paused for "Today", which means it will be paused until the end of the day.
To delete a rule, tap Delete on any rule's detail page.
Manage Rules at 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). The button can cycle through "Block off" (unblock), "Block for 1 hour" (temporary block), and "Block on" (permanently block) with each tap.
All blocking rules activated by the control buttons will also appear under the Rules listing screen. 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 choose to block the specific domain or block 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.
Layered Logic in Rules
The operational state of network access on a particular device can be determined by multiples rules defined at different layers:
- Rules for the device itself
- Rules for the device group that includes the device
- Rules for the network segment where the device is connected (Firewalla Gold and Purple only)
- Global rules apply to all devices
A network segment is a special device group. Its group membership is dynamic based on physical connectivity. Rules defined for a network segment will only apply to devices in that segment.
Device group membership is static. When a member device changes the segment, it still stays with the group. Group rules apply to member devices regardless of which segment the device is in.
The logic for rules processing is the following:
- When a device joins a group, all previously defined device-level rules will be removed. The device will adopt the rules defined at the group level (block rules can still be created at the device level from alarms).
- A device or device group will inherit the Network and Global rules if there is no conflict.
When there is conflict:
the priority of different levels are device > group > network > global.
- When there is conflict, device group rules will take precedence over Network rules.
- When there is conflict, Network rules will take precedence over Global rules.
At the same level, allow rule takes precedence over the block rule.
- If you have a rule allow a domain globally, but another rule block the Internet on a specific device, that device will not be able to access that domain. The priority here is Device > Global.
- On a device, if you have one rule allow the region US and another rule block YouTube, that device will still be able to access Youtube because traffic to the entire region (including where YouTube is hosted) is allowed. 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 device inherits 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. Because when there is a conflict, priority is Device > Network.
- If you block a domain in default mode, It may also block other domains due to IP address sharing. More details can be found here: How does Firewalla block domains?
- Please be careful when blocking Regions. The Internet is distributed, data centers are also distributed across the world.
Example: "firewalla.com" is based on Shopify, and Shopify is in Canada. Since there are many shops are using Shopify, if you blocked Region - Canada, you are likely going to have trouble shopping.
- Port-based and Regional targets are fairly large, please try not to use them to "allow" or give an exception to your rules. Please see 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 the outside your network will be able to access your local devices. This may increase security risks, so if you are not sure about it, we recommend using the default setting.
Blocking rules are bi-directional unless specified in Internet or Local Network targets.