I run a wisp with a few different packaged, for our most restricted package users are put in a vlan which has access to a mikrotik hotspot. I want to restrict them users to only being able to web browse, send and collect email so port 80, 443, 25, 110 & 53
There’s several ways to do this. Here’s a simple one, assuming that the hotspot to restrict runs on its on VLAN:
First, via mangle insert a packet mark on undesired traffic. Here, mark all TCP traffic that is coming in on the restricted VLAN and is not destined for permitted ports as well as all UDP traffic that isn’t DNS:
Felix’s rules will block all packets from an interface named “vlan-interface” except those destined for TCP ports 25,53,110,443 and UDP port 53. Mind you, these people will not be able to browse the internet because TCP port 80 is not included in the list. To allow browsing, just include port 80 in the list.