|
将 中科大 USTC IP Blacklist 转换成 RouterOS 格式并导入。 也可以使用脚本的方式自动导入: - <font face="Tahoma"># 黑名单列表名称
- :local listName "black_ip";
- :local url ("https://gateway.vsean.net/ustc_blackip/routeros.php?list_name=" . $listName);
- /tool fetch url=$url mode=https output=file dst-path="black_ip.rsc";
- import file=black_ip.rsc</font>
复制代码 示例防火墙脚本
- <font face="Tahoma">/ip firewall filter
- add action=reject chain=input comment="reject blocked" connection-state=new reject-with=icmp-network-unreachable \
- src-address-list=black_ip
- add action=reject chain=forward comment="reject blocked" connection-state=new reject-with=icmp-network-unreachable \
- src-address-list=black_ip
- /ipv6 firewall filter
- add action=reject chain=input comment="reject blocked" connection-state=new reject-with=icmp-address-unreachable \
- src-address-list=black_ip
- add action=reject chain=forward comment="reject blocked" connection-state=new reject-with=icmp-address-unreachable \
- src-address-list=black_ip</font>
复制代码
|