AZiT

Before you start

Hardware, networks, addresses, and how to read the guide.

Why Networks, on the tour

On this page 7 sections

What you will have#

At the end of this guide: an OpenBSD firewall with eight separated networks, DHCP and DNS for all of them, a default-deny policy where every rule is named in the logs, and every connection to the internet going through a WireGuard VPN that fails closed. Two networks, for a game console and for guests, go straight out by exception.

The other guides build on it. The Cluster and SIEM guide adds the Raspberry Pi boards, the Kubernetes cluster, and the SIEM that collects the firewall's logs and raises alerts; the Access point guide adds the Wi-Fi.

Hardware#

The networks#

Each network has its own port or VLAN, and its own /24. The firewall is always .1.

NetworkInterfaceSubnetForInternet
WANigc0from your providerthe internet connection
Adminigc1192.168.1.0/24the admin laptop, wiredthrough the VPN
AP managementigc2192.168.2.0/24the access point itselfnone
PS5igc3192.168.3.0/24a game consoledirect
Mediaigc4192.168.4.0/24a media playerthrough the VPN
Serversigc5192.168.5.0/24cluster, controller, Home Assistantthrough the VPN
Trustedvlan10 on igc2192.168.10.0/24phones and laptop on Wi-Fithrough the VPN
IoTvlan20 on igc2192.168.20.0/24devices that only need the internetthrough the VPN
Guestvlan30 on igc2192.168.30.0/24visitorsdirect

Within each network: .2 to .9 for infrastructure, .10 to .149 for fixed addresses, and .150 to .199 for a DHCP pool, only on networks that need one.

How to read the guide#

Placeholders#

A few values are different for everyone, or private. They appear in the files as @NAME@, highlighted, and the firewall refuses the file until each one is replaced.

PlaceholderFileWhat to put there
@ADMIN_USER@sshd_configThe user you create during the installation.
@MAC@dhcpd.confThe hardware address of each device that gets a fixed address. Delete the lines for devices you do not have.
@WG_PRIVATE_KEY@hostname.wg0Generated on the firewall in chapter 6. It never leaves the firewall.
@VPN_SERVER_PUBLIC_KEY@
@VPN_SERVER_ADDRESS@
@VPN_TUNNEL_ADDRESS@
@VPN_DNS_ADDRESS@
hostname.wg0, pf.conf, unbound.confFrom your VPN provider: the server's public key and address, the address your tunnel gets, and the provider's DNS server inside the tunnel.

What you will probably change#

Using these files#

The configuration files are free to use for any purpose (0BSD). The text is CC BY 4.0.

This is how one home network is built. Test changes on your own network before relying on them.