If you want to manage a single host/ IP address with rules regarding also the traffic from LAN (not only WAN), then you have to isolate that host/ IP address to a different broadcast domain (meanining, another LAN - let's say LAN2 - interface with another subnet).This is the only way to ”force” through OPNsense, for that specific host/ IP address, the traffic from/ to anywhere, LAN1 and WAN.Otherwise, only WAN (to/ from) traffic for that host will pass through OPNsense, hosts in the same subnet/ broadcast domain will pass through the switch(es) only.Cheers!PS Of course this implies, for fine tuning, performance and best practices, either different VLANs configured on the level 2 managed switch(es) and OPNsense for those different internal LANs, or different switches for those different interfaces/ broadcast domains (or that particular host/ IP address directly plugged in another OPNsense NIC). But, if you don't have either of these, then it works even with no different switches/ VLANs/ dedicated NIC on OPNsense, giving the fact that you will have some extra broadcast traffic in your network.
One thing to keep in mind when making all these rules and assuming that everything on the switch can talk to anything else on the switch is that assuming for instance we are talking about 192.168.1.0/24 and pfsense LAN is maybe 192.168.1.1 and everything else is .2 - .254The rules you put (or don't put) on the LAN firewall will impact the host's ability to communicate or not communicate with 192.168.1.1, which is pretty important.
You've just described my setup exactly. So are you saying I need some additional rule to allow the machine to access the DNS server at 192.168.1.1 (OPNsense)? I would have thought 192.168.1.1 is considered part of the local network, same as any other machine in the 192.168.1.x range.
QuoteYou've just described my setup exactly. So are you saying I need some additional rule to allow the machine to access the DNS server at 192.168.1.1 (OPNsense)? I would have thought 192.168.1.1 is considered part of the local network, same as any other machine in the 192.168.1.x range.Consider your OPNsense kind of "personal firewall" for the LAN port at 192.168.1.1. So if your sense is your DNS server, allow port 53 on 192.168.1.1 from LANnet. Done. If your DNS server is on another machine on the LAN, which has such a personal firewall enabled, you would need a firewall rule on THIS personal firewall, to reach your DNS server. If you run further services for your LAN on the sense, YMMV... ;-)
Well, lets say you have 10 devices on the lan switch and opnsense is one of them.The opnsense is usually providing DHCP services for all the devices on that lan switch. So lets say you start thinking "Why do I even need this default allow rule?". So you delete it.
Suddenly no device on the lan switch has access to the dhcp service and they are not allocated IPs.They also get their DNS from the opnsense LAN by default... But without that default allow rule they can't.
So, can all the devices on the LAN switch talk to each other no matter what you do with the opnsense firewall rules?Sure - But you usually need services on the opnsense, and thus you need at least the default rule.
So, even though you can't keep 10 devices on a dumb lan switch from communicating with firewall rules on the LAN so that DNS is broken, DHCP is broken, etc etc. So, just be sure to always allow every client access to all the services you need that run on the opnsense. Reading your initial question, to me, it sounds like you just need a couple of simple rules applied to the lan firewall for one single IP. Doesn't need to be to complicated.
It still makes no sense to me why a firewall rule that supposedly cannot restrict communications between devices on the local network somehow manages to restrict communications to OPNsense itself, even though OPNsense is very much on the local network.
Yes, I want to block all traffic to the WAN Net, but yes, I also want to block all traffic to all WAN addresses, so which do I choose? Using the "any" choice removes the ambiguity (and also assures me that nothing is leaking to the Internet), but has the unintended consequence that the devices cannot communicate with the local DNS or NTP servers in OPNsense