Hello All,
I am trying to work out a method to make a general firewall rule that prevents hosts from one network (e.g. ether2) from accessing hosts on the network with the default gateway that does not require advance knowledge of that IP subnet.
Consider a hotspot appliance that has a dhcp client on the internet side. If this is connected to a company LAN, then the LAN hosts become exposed to the public network.
If I knew in advance that a DHCP interface would pick up address 192.168.1.25/25 for example, I could make a firewall rule like
/ip firewall add chain=forward dst-address=192.168.1.0/24 action=drop
Packets destined for addresses beyond the gateway will still work (although won't be able to *ping* the gateway) but comms between the public network and this 'transit' network will be blocked.
What I am looking for is a way to do something general like:
/ip firewall add chain=forward dst-address=<subnet assigned by dhcp-cli-1> action=drop
Any ideas? I'm thinking scripting, but without any idup/ifdown kind of triggers, I'm can't think how to make a script fire up reliably..
Regards, Mike.