Create your first firewall rule
Check the routed setup from the network wizard, block one website with your first security rule, and verify both from a client.
This walkthrough starts where initial setup ends: a LAN connected to the Internet by the network wizard. It shows what the wizard created, adds a security rule that blocks one website, and verifies both from a client.
Before you start
You need:
- A routed setup. Choose Routing at Choose a deployment during initial setup, or run Network > Wizard later.
- A client to connect to the LAN.
- An administrator account permitted to configure objects and policies. In Manual publishing mode, it also needs permission to commit.
If you configured the WAN and LAN ports by hand instead, check their addresses, zones, default route, outbound NAT, and security rules against the table below, then continue to Block a website.
What the wizard created
The wizard publishes a complete routed setup. LAN clients can reach the Internet without any further rule.
| Where | Result |
|---|---|
| Network > Interfaces | The Internet and LAN ports with their addressing |
| Network > Zones | An Internet-facing zone and a LAN-facing zone, each holding its port |
| Network > Virtual Routers | Both ports as members, and the default route toward the Internet |
| Network > DHCP | The LAN DHCP server, if you enabled it |
| Policies > NAT | wizard-internet-snat, which translates LAN sources to the Internet interface address, if you left NAT enabled |
| Policies > Security | wizard-internet-allow, which allows sessions from the LAN zone to the Internet zone and logs them |
wizard-internet-allow permits every application and service from the LAN zone. The default rules
still deny other traffic between zones, including sessions that start from the Internet. To restrict
what LAN clients can reach, add rules above it, as in Block a website.
Block a website
Add a deny rule above the wizard's allow rule. Security rules are checked from top to bottom, so the more specific rule has to come first.
- Open Objects > Traffic Selectors > FQDNs and create an object named
blocked-sitecontainingexample.com. A plain domain also matches its subdomains. - Open Policies > Security, create an enabled rule named
block-example, and select Deny. - Add Source Zone matching the LAN zone, Destination Zone matching the Internet zone, and
Destination FQDN matching
blocked-site. - Move the rule above
wizard-internet-allowand save it.
With Publish on save, the default, the object and the rule take effect when you save them. In Manual mode, open Config Repository > Pending Changes, review both, and commit them. See Publish on save and Manual mode.
For other pattern formats, see FQDNs; for what a denied client receives, see Security Rules.
Verify and troubleshoot
- Connect a client to the LAN. With the DHCP server enabled, it receives its address automatically. Otherwise, give it a static address in the LAN subnet, with the firewall's LAN address as its default gateway.
- Open a website from the client. It loads.
- Open
example.com. The page does not load. - Open Policies > Security and check that the hit counts of
wizard-internet-allowandblock-examplehave both increased. Look for the client's sessions in Analytics > Source IPs or Logs > Session Records. Allow for collection delay and check the selected time range.
If no website loads, check the interface link and address, virtual-router membership and default
route, NAT rule, security rule order, and whether your changes are published, in that order. If example.com
still loads, check that block-example is enabled, published, and above wizard-internet-allow.
To check which rule a session would match without sending traffic, use Policy Verification. See Config Repository for publication and recovery, and Diagnostic Tools for diagnostics.
Continue with Concepts in the Admin Guide to understand sessions, rules, and configuration state.