Hello,
I’m redoing all my OPNSense firewall rules, as I really didn’t understand what I was doing when I started and ended up with rules that were both too simple and too complex, depending on the VLAN.
(Like, I thought all internal traffic that never left a VLAN still needed a firewall rule on that VLAN to allow in-VLAN devices to talk to each other. Turns out that so long as the devices on the same VLAN have a direct path between each other via, e.g., a switch or switches, they never touch the firewall. Oops.)
Context: Feel free to shame me, but I’m still on 25.7. I’ve been putting off migrating entirely because I didn’t want to deal with ISC to DNSmasq migration, but with the PHP imbroglio happening, I’ve clearly waited way too long. I want to try to clean up my firewall rules a bit first.
Here’s something really simple that I’d like to start with: Rule(s) that:
- Allow any device on the VLAN to access the WAN; and
- Prevent any inter-VLAN traffic.
- Prevent any in-VLAN device from talking to OPNSense on the gateway interface (e.g., 192.168.1.1) but still allow critical services to work (DNS, DHCP, etc.).
For (1), I’ve seen something like, Allow (Not) All Private Networks (that is, invert an “allow all private networks” rule) to enable WAN traffic, but I don’t know if that’s actually necessary or not to allow, e.g., a client device to just access the internet.
Thing Two: No-Rule VLANs? @LTS_Tom talks about making storage networks unroutable, and I admit I’m not … entirely sure how to do that in OPNSense. Is it possible (or a good idea?) to define a network with no gateway whose members can still use DHCP and DNS?
In the meantime, I’ve got a Storage VLAN (10 Gbps-only), so I just made sure it has no firewall rules. Is that he correct approach?
All the devices that talk to it live on the storage VLAN, including client devices with multiple virtual NICs (each virtual NIC assigned to a separate VLAN, and the client set up not to allow routing between VLANs). It works, and I’m a single person with a bedroom office with too many computers stuffed in it, so that’s worked for me so far. But I’m not sure it’s what Tom was actually recommending. ![]()
Any advice for simple, sane rules for that would be appreciated.
