Is there a way to unlimited some services or IP after user login to hotpsot?
Unlimited means not count the bandwidth usage, unlimited speed.
Thanks,
/ip firewall nat add chain=pre-hotspot action=accept
dst-address-type=!local hotspot=auth
/ip firewall mangle
add comment="mark exempt upstream to tcp/10000" chain=prerouting in-interface=hotspot protocol=tcp dst-port=10000 action=mark-packet new-packet-mark=exempt-upstream
add comment="mark exempt upstream to 1.1.1.0/24" chain=prerouting in-interface dst-address=1.1.1.0/24 action=mark-packet new-packet-mark=exempt-upstream
add comment="mark exempt downstream from tcp/10000" chain=postrouting out-interface=hotspot protocol=tcp src-port=10000 action=mark-packet new-packet-mark=exempt-downstream
add comment="mark exempt downstream from 1.1.1.0/24" chain=postrouting out-interface src-address=1.1.1.0/24 action=mark-packet new-packet-mark=exempt-downstream
/queue types
add name=exempt-upstream kind=sfq
add name=exempt-downstream kind=sfq
/queue trees
add name=exempt-upstream parent=global-in queue=exempt-upstream packet-mark=exempt-upstream max-limit=1G
add name=exempt-downstream parent=global-out queue=exempt-downstream packet-mark=exempt-downstream max-limit=1G
That bypasses NAT and filter rules only and doesn't affect simple queues. It's surprisingly hard to exempt certain traffic from rate limiting when using a Hotspot. You can override the simple queues that Hotspots use for rate limiting all traffic via queue trees attached to global-in and global-out, and then give those queues very high rate limits. For example, to exempt all traffic from Hotspot users to services running on tcp/10000 and traffic to any host with an IP address on the 1.1.1.0/24 network, as well as all returning traffic, you would do something like below. First mark all the traffic from Hotspot user to the Internet in prerouting, and all return traffic in postrouting. Then create queue types for that traffic, and finally queues that override simple queues with a rate limit of 1 Gbps, effectively giving unlimited bandwidth. I'm assuming the interface the Hotspot is running on is called 'hotspot'.
There may be typos in that since it's made up on the fly, but the theory of it works just fine.Code: Select all/ip firewall mangle add comment="mark exempt upstream to tcp/10000" chain=prerouting in-interface=hotspot protocol=tcp dst-port=10000 action=mark-packet new-packet-mark=exempt-upstream add comment="mark exempt upstream to 1.1.1.0/24" chain=prerouting in-interface dst-address=1.1.1.0/24 action=mark-packet new-packet-mark=exempt-upstream add comment="mark exempt downstream from tcp/10000" chain=postrouting out-interface=hotspot protocol=tcp src-port=10000 action=mark-packet new-packet-mark=exempt-downstream add comment="mark exempt downstream from 1.1.1.0/24" chain=postrouting out-interface src-address=1.1.1.0/24 action=mark-packet new-packet-mark=exempt-downstream /queue types add name=exempt-upstream kind=sfq add name=exempt-downstream kind=sfq /queue trees add name=exempt-upstream parent=global-in queue=exempt-upstream packet-mark=exempt-upstream max-limit=1G add name=exempt-downstream parent=global-out queue=exempt-downstream packet-mark=exempt-downstream max-limit=1G