Skip to main content

Blocked sites

Blocked sites are domains the computers of a room cannot reach while the room's internet is on: for example youtube.com during a lesson, or a game site. They are the opposite of allowed sites, which a room can still reach while its internet is off. There are:

  • All rooms: one list per firewall, blocked in every room of that firewall;
  • a list per room (optional), blocked only for room SB1-102.

A room reaches everything its policy allows except the domains of the list for all rooms and its own list. A list stays until someone edits it; nothing clears it by itself.

How it works​

Each list is an address group on the FortiGate (Matrix blocked sites, Matrix blocked sites SB1-102) with a DENY policy that the FortiGate's administrator sets up once: the rooms' address groups as source, the list's group as destination. The FortiGate uses the first policy that matches a connection, so the DENY policy must sit above the room policies it covers; below them it blocks nothing, and the list shows Policy below the room with the exact command that moves it (Setup status). The allowed-sites policies of the same rooms belong above the DENY policies: the FortiGate blocks by address, and when an allowed site (a test site, say) shares a Cloudflare or CDN address with a blocked one, the policy that comes first decides. Below a DENY policy, an allowed site is blocked for as long as the two share an address (often a few minutes), and the list shows Allowed sites below with the commands that move them. Matrix never creates, changes or moves policies: it only changes the members of these groups, exactly as for allowed sites.

Limits, the same as allowed sites:

  • Domains only (example.com, or *.example.com for all its subdomains). Not IP addresses and not paths: youtube.com/watch?v=… blocks the whole of youtube.com. No wildcard on a public suffix such as *.co.uk or *.github.io (see Allowed sites).
  • A blocked domain takes its subdomains with it. Adding geforcenow.com saves both geforcenow.com and *.geforcenow.com, so play.geforcenow.com is blocked too. Removing the domain removes both; removing only the *. line unblocks the subdomains and keeps the domain itself blocked. Domains blocked before this need the *. line added by hand (add *.example.com).
  • The FortiGate blocks the addresses a domain resolves to. A site behind a shared network such as Cloudflare or a large CDN shares its addresses with many other sites, and blocking it can block those neighbours too. Check after blocking such a site.
  • Wildcard domains (*.example.com) only work when the FortiGate sees the computers' DNS queries.
  • Connections already open when a domain is added may continue until they close; new ones are blocked.
  • At most 200 domains per list.

Who can edit​

The same rights as allowed sites: tenant admins edit every list and see the FortiGate setup commands; teachers edit the lists of the rooms granted to them (Room rights) and only view the list for all rooms; viewers see every list.

Editing uses the same switches: the firewall's Allow editing allowed and blocked sites (Firewalls) and matrix-connector guard set <firewall id> --site-writes on on the connector computer. The connector must support blocked sites; an older one shows The connector of this firewall does not support blocked sites yet.

The page​

Blocked sites in the menu works like the allowed sites page: choose the firewall, the list for all rooms comes first, then Room lists, a table with search and building filter whose rows open each room's page, where the room's list is edited. Adding, removing, saving, Check / retry and the results are the same as for allowed sites (Add and remove domains, Saving and results); a confirmed save shows The blocked sites are saved and confirmed.

Allowed and blocked lists are separate: one change of each may run at the same time for the same room. A domain on both lists of a room is blocked while the room's internet is on, and reachable while it is off.

Setup status​

As for allowed sites (Setup status), with a DENY policy instead of an ACCEPT policy, and one more status:

StatusMeaning
Policy below the roomThe policy "…" (ID N) comes after the room policy, so it has no effect. Move it up in the FortiGate CLI: config firewall policy / move N before M / end (M is the first policy of the room, or of any room for the list for all rooms).
Allowed sites belowAllowed-sites policies come after the policy "…" (ID N), so an allowed site that shares an IP address with a blocked one is blocked too. Move them up in the FortiGate CLI: config firewall policy / move A before N / … / end (A: each allowed-sites policy of the same rooms below it).

FortiGate setup​

Settings → Firewalls, the firewall's page, FortiGate setup of the sites lists → Blocked sites (tenant admins) shows the CLI that creates the missing groups and DENY policies, like for allowed sites. New policies land at the end of the policy list, where they block nothing: after pasting them, move each one above the room policies. Once the connector reports the new policies (within a few minutes) the page shows the exact move command for each list that is still below its room. Details: Setting up the FortiGate → Blocked sites.

On the rooms page​

Each room card on Rooms shows N blocked sites next to the allowed sites chip (the list for all rooms plus the room's own list) when the connector supports blocked sites. It opens the room's page at its lists.

History​

Every save, including refused ones, is recorded as Blocked sites (blocked_sites) with the list, the group and the domains added and removed (History).