Protect Default Port Service From WAN - Mikrotik Script RouterOS

Changing the Default Service Port used by Mikrotik such as telnet, ssh, ftp, winbox, www and api. or if it is not used, it can be turned off / disabled

notes: if using a custom port, please add your own

/ip firewall filter
add action=drop chain=input dst-port=21,22,23,8291,80,8728,8279  in-interface-list=WAN protocol=tcp
add action=drop chain=input dst-rt=21,22,23,8291,80,8728,8279 in-interface-list=WAN protocol=udp
Credit: www.o-om.com