On a remote site, I’ve got the following setup (details omitted):
Cloud server — ------ Router ----- ---- Printer
The printer receives printing jobs from a Cloud server over the Internet.
This cloud server has a fixed public IP address.
The router is provided by an ISP.
It can implement some NAT/PAT rules but unfortunately, cannot use source IP to filter some traffic !
The router has a fixed public IP and a fixed private one.
For various reasons, I can’t change any device address.
I’m thinking about adding a box between the LAN and the printer to filter unwanted traffic.
The three rules I would like to implement on this box are:
“1. accept traffic coming in from LAN-facing interface, with Cloud server IP address and destined to printer IP and specific application port
2. drop traffic coming in from LAN-facing interface and destined to printer IP and specific application port
3. let anything else pass through”
Otherwise disable bridge hardware-offload and use /interface bridge filter rules, which should be sufficient in this case, otherwise it is one of the few scenarious where /interface bridge settings set use-ip-firewall=yes and using /ip firewall filter rules is applicable
I couldn’t succeed yet, using a 6.49.6 powered mAP.
During my first testing, I wrote a couple of rules in IP/Firewall/Filter rules. Is it the correct tool to implement my rules ?
While searching, I also found potentially relevant forms in Bridge/Filters and Switch/Rules but I didn’t use any of them.
That’s one of possibilities … but make sure you enable “use-ip-firewall=yes” as suggested by @tdw. Beware that for this use case apply rule properties which are slightly different than for “normal” IP firewall.
Use of bridge filters is another possibility, even more resource friendy but way less flexible …e.g. it’s not possible to reference connection states (because bridge rules are L2 while statefull firewall is L4).
Perhaps show us what you came up with so far and somebody might help you get further.
My test is ping PC3 from PC2 while PC1 is for configuring mAP. mAP’s interface to PC3 is ether2 and mAP ether1 is connected is upstream Switch1.
During my tests, PC2 could positively ping PC3.
I was waiting this to fail due to my firewall rule named FOO.
It could be that traffic between both wired ports is entirely handled by (integrated) switch and thus bypasses bridge and firewall. Set one (or both) ether ports with hw=no in /interface/bridge/port configuration section, this should force traffic through CPU and thus allow bridge to do filtering.