Ahoj, mám následující script:
:log info message=1
:local newUser
:log info message=2
:foreach ip in=[/ip firewall address-list find list=NewUser] do={
:log info message=3
:set newUser [/ip firewall address-list get $ip address]
:log info message=4
/ip firewall address-list add address=$newUser list=Users comment=$newUser
:log info message=5
/ip firewall mangle add action=jump chain=prerouting jump-target="UP-$newUser" src-address= $newUser comment="Jump-To-User-Upload-$newUser" place-before=0
:log info message=6
/ip firewall mangle add action=jump chain=postrouting dst-address=$newUser jump-target="DOWN-$newUser" comment="Jump-To-User-Download-$newUser" place-before=0
/ip firewall mangle add action=mark-packet chain="DOWN-$newUser" comment="DOWN-Critical-$newUser" dst-address=$newUser new-packet-mark="DOWN-Critical-$newUser" passthrough=no protocol=icmp
/ip firewall mangle add action=mark-packet chain="DOWN-$newUser" comment="DOWN-Critical-$newUser-DNS" dst-address=$newUser dst-port=53 new-packet-mark="DOWN-Critical-$newUser" passthrough=no protocol=tcp
/ip firewall mangle add action=mark-packet chain="DOWN-$newUser" comment="DOWN-Games-$newUser" disabled=yes dst-address=$newUser new-packet-mark="DOWN-Games-$newUser" passthrough=no protocol=icmp
/ip firewall mangle add action=mark-packet chain="DOWN-$newUser" comment="DOWN-Critical-$newUser-DNS" dst-address=$newUser dst-port=53 new-packet-mark="DOWN-Critical-$newUser" passthrough=no protocol=udp
/ip firewall mangle add action=mark-packet chain="UP-$newUser" comment="UP-Critical-$newUser" new-packet-mark="UP-Critical-$newUser" passthrough=no protocol=icmp src-address=$newUser
/ip firewall mangle add action=mark-packet chain="UP-$newUser" comment="UP-Critical-$newUser-DNS" new-packet-mark="UP-Critical-$newUser" passthrough=no protocol=tcp src-address=$newUser src-port=53
/ip firewall mangle add action=mark-packet chain="UP-$newUser" comment="UP-Critical-$newUser-DNS" new-packet-mark="UP-Critical-$newUser" passthrough=no protocol=udp src-address=$newUser src-port=53
/ip firewall mangle add action=mark-packet chain="UP-$newUser" comment="UP-Games-$newUser" disabled=yes new-packet-mark="UP-Games-$newUser" passthrough=no protocol=icmp src-address=$newUser
/ip firewall mangle add action=mark-packet chain="DOWN-$newUser" comment="DOWN-SpeedTest-$newUser" dst-address=$newUser new-packet-mark="DOWN-SpeedTest-$newUser" passthrough=no src-address-list=SpeedTests
/ip firewall mangle add action=mark-packet chain="UP-$newUser" comment="UP-SpeedTest-$newUser" dst-address-list=SpeedTests new-packet-mark="UP-SpeedTest-$newUser" passthrough=no src-address=$newUser
/ip firewall mangle add action=mark-packet chain="DOWN-$newUser" comment="DOWN-P2P-$newUser" dst-address=$newUser new-packet-mark="DOWN-P2P-$newUser" p2p=all-p2p passthrough=no
/ip firewall mangle add action=mark-packet chain="DOWN-$newUser" comment="UP-P2P-$newUser" new-packet-mark="UP-P2P-$newUser" p2p=all-p2p passthrough=no src-address=$newUser
/ip firewall mangle add action=mark-packet chain="DOWN-$newUser" comment="DOWN-Other-$newUser" dst-address=$newUser new-packet-mark="DOWN-Other-$newUser" passthrough=no
/ip firewall mangle add action=mark-packet chain="UP-$newUser" comment="UP-Other-$newUser" new-packet-mark="UP-Other-$newUser" passthrough=no src-address=$newUser
/ip firewall mangle add action=jump chain="UP-$newUser" comment="UP-EXIT-$newUser" jump-target=EXIT
/ip firewall mangle add action=jump chain="DOWN-$newUser" comment="DOWN-EXIT-$newUser" jump-target=EXIT
/queue tree add name="User-$newUser" parent=top queue=Users
/queue tree add limit-at=6M max-limit=32M name="Download-$newUser" parent="User-$newUser" queue=Users
/queue tree add limit-at=2M max-limit=31M name="Upload-$newUser" parent="User-$newUser" queue=Users
/queue tree add limit-at=512k max-limit=4M name="Down-Critical-$newUser" packet-mark="DOWN-Critical-$newUser" parent="Download-$newUser" priority=1 queue=Users
/queue tree add limit-at=4M max-limit=30M name="Down-SpeedTests-$newUser" packet-mark="DOWN-SpeedTest-$newUser" parent="Download-$newUser" priority=3 queue=Users
/queue tree add limit-at=2M max-limit=8M name="Down-ALL-$newUser" parent="Download-$newUser" queue=Users
/queue tree add limit-at=512k max-limit=4M name="Down-Games-$newUser" packet-mark="DOWN-Games-$newUser" parent="Down-ALL-$newUser" priority=2 queue=Users
/queue tree add limit-at=2M max-limit=8M name="Down-Other-$newUser" packet-mark="DOWN-Other-$newUser" parent="Down-ALL-$newUser" priority=4 queue=Users
/queue tree add limit-at=512k max-limit=4M name="Up-Critical-$newUser" packet-mark="UP-Critical-$newUser" parent="Upload-$newUser" priority=1 queue=Users
/queue tree add max-limit=30M name="Up-SpeedTests-$newUser" packet-mark="UP-SpeedTest-$newUser" parent="Upload-$newUser" priority=3 queue=Users
/queue tree add limit-at=1M max-limit=4M name="Up-ALL-$newUser" parent="Upload-$newUser" queue=Users
/queue tree add limit-at=1M max-limit=4M name="Up-Other-$newUser" packet-mark="UP-Other-$newUser" parent="Up-ALL-$newUser" priority=4 queue=Users
/queue tree add max-limit=2M name="Up-P2P-$newUser" packet-mark="UP-P2P-$newUser" parent="Up-ALL-$newUser" queue=Users
/queue tree add max-limit=4M name="Down-P2P-$newUser" packet-mark="DOWN-P2P-$newUser" parent="Down-ALL-$newUser" queue=Users
/queue tree add limit-at=512k max-limit=4M name="Up-Games-$newUser" packet-mark="UP-Games-$newUser" parent="Up-ALL-$newUser" priority=2 queue=Users
/ip firewall address-list remove [find list=NewUser address=$newUser]
}
Script jde pustit pomocí terminálu system script run ...
ale, když ho pustím přes tačítko RUN u scriptu nebo přes scheduler, tak provede pouze kroky 1,2,3,4,5 a dál už nic.
Díky za případné rady