π₯ Firewall Regels
De firewall op de UDM Pro controleert welk verkeer tussen VLANs is toegestaan.
Zone-Based Firewall
Het Hamming netwerk gebruikt de nieuwe UniFi Zone-Based Firewall. Alle VLANs zitten in de Internal zone.
Zones
| Zone | Netwerken |
|---|---|
| Internal | VLAN 1, 10, 20, 30 |
| External | Internet (WAN) |
| VPN | Tailscale, etc. |
Firewall Regels Overzicht
βββββββββββββββ β
Full βββββββββββββββ
β VLAN 1 βββββββββββββββββββββββΊβ VLAN 10 β
β Management β Access β Clients β
ββββββββ¬βββββββ ββββββββ¬βββββββ
β β
β β
Full β β
Full
βΌ βΌ
βββββββββββββββ β Blocked βββββββββββββββ
β VLAN 20 ββββββββββββββββββββββββ VLAN 10 β
β IoT β β Clients β
ββββββββ¬βββββββ βββββββββββββββ
β
β β οΈ DNS only (naar VLAN 1)
β
β β Blocked (naar VLAN 10)
β
ββββββββΌβββββββ
β VLAN 30 β β Volledig geΓ―soleerd
β Cameras β β Geen internet
βββββββββββββββ
β²
β β
Frigate only
β (192.168.1.15)
Toegestane Regels
Allow Frigate to Cameras (10004)
| Setting | Waarde |
|---|---|
| Type | Allow |
| Source | 192.168.1.15 (Frigate) |
| Destination | VLAN 30 (Cameras) |
| Port | Any |
| Protocol | TCP/UDP |
Doel: Frigate kan camera streams ophalen via RTSP.
Allow Hamming to DNS (10000)
| Setting | Waarde |
|---|---|
| Type | Allow |
| Source | VLAN 10 |
| Destination | 192.168.1.13 |
| Port | 53 |
| Protocol | TCP/UDP |
Doel: Clients kunnen Pi-hole gebruiken als DNS.
Allow Hamming to IoT (10003)
| Setting | Waarde |
|---|---|
| Type | Allow |
| Source | VLAN 10 |
| Destination | VLAN 20 |
| Port | Any |
| Protocol | Any |
Doel: Je kunt vanaf je laptop/telefoon IoT apparaten bedienen.
Allow Hamming to Management (10002)
| Setting | Waarde |
|---|---|
| Type | Allow |
| Source | VLAN 10 |
| Destination | VLAN 1 |
| Port | Any |
| Protocol | Any |
Doel: Clients kunnen bij servers (NAS, Docker, etc.).
Allow Management to Hamming
| Setting | Waarde |
|---|---|
| Type | Allow |
| Source | VLAN 1 |
| Destination | VLAN 10 |
| Port | Any |
| Protocol | Any |
Doel: Servers kunnen clients bereiken indien nodig.
Allow Management to IoT (10005)
| Setting | Waarde |
|---|---|
| Type | Allow |
| Source | VLAN 1 |
| Destination | VLAN 20 |
| Port | Any |
| Protocol | Any |
Doel: Management kan IoT apparaten beheren.
Allow IoT to DNS (10001)
| Setting | Waarde |
|---|---|
| Type | Allow |
| Source | VLAN 20 |
| Destination | 192.168.1.13 |
| Port | 53 |
| Protocol | TCP/UDP |
Doel: IoT apparaten kunnen DNS gebruiken.
Blokkeer Regels
Block Cameras to All (10007)
| Setting | Waarde |
|---|---|
| Type | Block |
| Source | VLAN 30 |
| Destination | Internal (alle VLANs) |
| Connection State | All |
Doel: Camera's kunnen niets initiΓ«ren naar andere netwerken.
Block Cameras to Internet (10000)
| Setting | Waarde |
|---|---|
| Type | Block |
| Source | VLAN 30 |
| Destination | External (Internet) |
| Connection State | All |
Doel: Camera's hebben geen internettoegang (geen "phone home").
Block IoT to Hamming (10008)
| Setting | Waarde |
|---|---|
| Type | Block |
| Source | VLAN 20 |
| Destination | VLAN 10 |
| Connection State | Custom β New |
Doel: IoT kan geen verbindingen starten naar clients.
KRITIEK: Connection State
Deze regel moet Connection State: Custom β New hebben, niet "All"!
- β New: Blokkeert alleen nieuwe verbindingen vanuit IoT
- β All: Blokkeert ALLES inclusief antwoorden (werkt niet!)
Block IoT to Management (10006)
| Setting | Waarde |
|---|---|
| Type | Block |
| Source | VLAN 20 |
| Destination | VLAN 1 |
| Connection State | Custom β New |
Doel: IoT kan geen nieuwe verbindingen naar Management (behalve DNS).
Regel Volgorde
Volgorde is cruciaal!
Firewall regels worden van boven naar beneden geΓ«valueerd. De eerste match wint.
Juiste volgorde:
- Allow regels (specifiek)
- Block regels (algemeen)
In UniFi: 1. Ga naar Firewall Rules 2. Klik "Manage" (rechtsonder) 3. Sleep regels naar juiste volgorde 4. Allow regels BOVEN block regels
Firewall Regel Aanmaken
In UniFi Network
- Settings β Firewall & Security β Firewall Rules
- Create New Rule
- Vul in:
- Name: Beschrijvende naam
- Type: Allow of Block
- Source: VLAN, IP, of groep
- Destination: VLAN, IP, of groep
- Protocol/Port: Specifiek of Any
- Advanced:
- Connection State:
- All (voor block camera's)
- Custom β New (voor block IoT naar andere VLANs)
- Apply
Connection State Uitleg
| State | Betekenis | Wanneer gebruiken |
|---|---|---|
| All | Alle pakketten | Block regels voor volledige isolatie |
| New | Alleen nieuwe verbindingen | Block regels waar return traffic wel mag |
| Established | Bestaande verbindingen | Allow return traffic |
| Related | Gerelateerde verbindingen | FTP, SIP, etc. |
Troubleshooting
IoT kan niet bij DNS
- Check "Allow IoT to DNS" regel bestaat
- Check dat deze BOVEN de block regels staat
- Test:
Client kan niet bij NAS/Server
- Check "Allow Hamming to Management" regel
- Verifieer VLAN van client:
- Test connectiviteit:
IoT apparaat werkt niet meer na firewall change
- Check Connection State van block regels
- Moet "New" zijn, niet "All"
- Herstart het IoT apparaat
Camera's nog steeds online
- Check "Block Cameras to Internet" regel
- Connection State moet "All" zijn
- Verifieer camera is echt in VLAN 30:
- Check switch poort configuratie
Firewall Logs Bekijken
- UniFi Network β Settings β System β Advanced
- Enable "Detailed Logging"
- Ga naar System Logs
- Filter op "Firewall"