> For the complete documentation index, see [llms.txt](https://www.winbox.org/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://www.winbox.org/firewall/firewall2.md).

# 二次登录防火墙

> /ip firewall address-list add address=10.0.0.0/8 list=login&#x20;
>
> /ip firewall address-list add address=172.16.0.0/12 list=login&#x20;
>
> /ip firewall address-list add address=192.168.0.0/16 list=login&#x20;
>
> /ip firewall mangle add chain=input protocol=tcp dst-port=8888 action=add-src-to-address-list address-list=login address-list-timeout=30m comment=login&#x20;
>
> /ip firewall filter add chain=input protocol=udp dst-port=53 src-address-list=!login action=drop comment=login
>
> /ip firewall filter add chain=input protocol=tcp dst-port=8728,8729,21,22,23,53,80,2000,8291 src-address-list=!login action=drop comment=login

> 上面的脚本，能修改的地方就是8888端口。然后导入脚本， 登陆winbox先加端口8888登陆一次， 就可以用WINBOX默认端口登陆了

<figure><img src="https://296990390-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LYTqCnvQ7_cVIl1ZPou%2Fuploads%2FOsvVKKgnFP66kZSeGh8o%2FSnipaste_2022-08-27_19-24-15.png?alt=media&amp;token=926c49ac-4003-4a0b-9266-f5d3312dfb35" alt=""><figcaption></figcaption></figure>
