博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
ROS 禁止公网暴力破解SSH FTP
阅读量:4986 次
发布时间:2019-06-12

本文共 3184 字,大约阅读时间需要 10 分钟。

最简单的彻底禁止公网访问SSH FTP端口

1
2
/ip
firewall filter
add chain=input protocol=tcp dst-port=21-22 src-address-list=!allow-addresses action=drop comment=
"禁止公网SSH & FTP"
disabled=no

使用IP列表来实现更灵活的策略,三分钟之内只能允许建立三次新会话,超过了就阻塞

1
2
3
4
5
6
7
8
/ip
firewall filter
add chain=input protocol=tcp dst-port=21,22,23,8291 src-address-list=login_blacklist action=drop comment=
"drop login brute forcers 1"
disabled=no
add chain=input protocol=tcp dst-port=21,22,23,8291 connection-state=new src-address-list=login_stage5 action=add-src-to-address-list address-list=login_blacklist address-list-timeout=1d comment=
"drop login brute forcers 2"
disabled=no
add chain=input protocol=tcp dst-port=21,22,23,8291 connection-state=new src-address-list=login_stage4 action=add-src-to-address-list address-list=login_stage5 address-list-timeout=1m comment=
"drop login brute forcers 3"
disabled=no
add chain=input protocol=tcp dst-port=21,22,23,8291 connection-state=new src-address-list=login_stage3 action=add-src-to-address-list address-list=login_stage4 address-list-timeout=1m comment=
"drop login brute forcers 4"
disabled=no
add chain=input protocol=tcp dst-port=21,22,23,8291 connection-state=new src-address-list=login_stage2 action=add-src-to-address-list address-list=login_stage3 address-list-timeout=1m comment=
"drop login brute forcers 5"
disabled=no
add chain=input protocol=tcp dst-port=21,22,23,8291 connection-state=new src-address-list=login_stage1 action=add-src-to-address-list address-list=login_stage2 address-list-timeout=1m comment=
"drop login brute forcers 6"
disabled=no
add chain=input protocol=tcp dst-port=21,22,23,8291 connection-state=new action=add-src-to-address-list address-list=login_stage1 address-list-timeout=1m comment=
"drop login brute forcers 7"
disabled=no

防端口扫描

1
2
3
4
5
6
7
8
9
/ip
firewall filter
add chain=input protocol=tcp psd=21,3s,3,1 action=add-src-to-address-list address-list=
"port scanners"
address-list-timeout=14d comment=
"Port scanners to list"
disabled=no 
add chain=input protocol=tcp tcp-flags=fin,!syn,!rst,!psh,!ack,!urg action=add-src-to-address-list address-list=
"port scanners"
address-list-timeout=14d comment=
"NMAP FIN Stealth scan"
add chain=input protocol=tcp tcp-flags=fin,syn action=add-src-to-address-list address-list=
"port scanners"
address-list-timeout=14d comment=
"SYN/FIN scan"
add chain=input protocol=tcp tcp-flags=syn,rst action=add-src-to-address-list address-list=
"port scanners"
address-list-timeout=14d comment=
"SYN/RST scan"
add chain=input protocol=tcp tcp-flags=fin,psh,urg,!syn,!rst,!ack action=add-src-to-address-list address-list=
"port scanners"
address-list-timeout=14d comment=
"FIN/PSH/URG scan"
add chain=input protocol=tcp tcp-flags=fin,syn,rst,psh,ack,urg action=add-src-to-address-list address-list=
"port scanners"
address-list-timeout=14d comment=
"ALL/ALL scan"
add chain=input protocol=tcp tcp-flags=!fin,!syn,!rst,!psh,!ack,!urg action=add-src-to-address-list address-list=
"port scanners"
address-list-timeout=14d comment=
"NMAP NULL scan"
add chain=input src-address-list=
"port scanners"
action=drop comment=
"dropping port scanners"
disabled=no

转载于:https://www.cnblogs.com/yangjig/p/9977322.html

你可能感兴趣的文章
C#套打
查看>>
PolyCluster: Minimum Fragment Disagreement Clustering for Polyploid Phasing 多聚类:用于多倍体的最小碎片不一致聚类...
查看>>
【每日进步】July 2012
查看>>
327 作业
查看>>
sql 取汉字首字母
查看>>
javascript 封装ajax(多版本)
查看>>
bzoj4034: [HAOI2015]树上操作(树剖)
查看>>
android-Activity
查看>>
${sessionScope.user}的使用方法
查看>>
IOS断点下载
查看>>
Steal 偷天换日 题解(From luoguBlog)
查看>>
Hadoop HDFS学习总结
查看>>
C#wxpay和alipay
查看>>
Combination Sum
查看>>
WCF开发框架形成之旅---结合代码生成工具实现快速开发
查看>>
Spring事务管理
查看>>
JS||JQUERY常用语法
查看>>
talend hive数据导入到mysql中
查看>>
ORA-01093: ALTER DATABASE CLOSE only permitted with no sessions connected
查看>>
linux下mysql配置文件my.cnf详解
查看>>