Skip to Content
Cybrave OS

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.

WhereResult
Network > InterfacesThe Internet and LAN ports with their addressing
Network > ZonesAn Internet-facing zone and a LAN-facing zone, each holding its port
Network > Virtual RoutersBoth ports as members, and the default route toward the Internet
Network > DHCPThe LAN DHCP server, if you enabled it
Policies > NATwizard-internet-snat, which translates LAN sources to the Internet interface address, if you left NAT enabled
Policies > Securitywizard-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.

  1. Open Objects > Traffic Selectors > FQDNs and create an object named blocked-site containing example.com. A plain domain also matches its subdomains.
  2. Open Policies > Security, create an enabled rule named block-example, and select Deny.
  3. Add Source Zone matching the LAN zone, Destination Zone matching the Internet zone, and Destination FQDN matching blocked-site.
  4. Move the rule above wizard-internet-allow and 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

  1. 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.
  2. Open a website from the client. It loads.
  3. Open example.com. The page does not load.
  4. Open Policies > Security and check that the hit counts of wizard-internet-allow and block-example have 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.