首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >我可以在邮件服务器的路由器后面使用fail2ban吗?

我可以在邮件服务器的路由器后面使用fail2ban吗?
EN

Stack Overflow用户
提问于 2019-11-18 10:30:29
回答 1查看 810关注 0票数 0

我在FritzBox路由器后面的家庭网络上运行Docker。邮件和web服务器被篡改,外部端口22、80、443被转发到NAS上的应答端口,Traefik充当反向代理。

虽然traefik可以很好地工作,这要感谢X-Forwarded头和HTTP1.1 Host头,但是我无法设置fail2ban来阻止流氓客户端的过多登录尝试。由于路由器上的NAT,邮件容器似乎总是将路由器的IP作为源。

服务器日志如下所示:

代码语言:javascript
复制
dovecot: auth: passwd-file(luv5@xn--...,172.19.0.1): unknown user (SHA1 of given password: 63f39e)
postfix/smtpd[1118]: warning: unknown[172.19.0.1]: SASL LOGIN authentication failed: UGFzc3dvcmQ6
postfix/smtpd[1118]: disconnect from unknown[172.19.0.1] ehlo=1 auth=0/1 rset=1 quit=1 commands=3/4
postfix/smtpd[1028]: warning: unknown[172.19.0.1]: SASL LOGIN authentication failed: Connection lost to authentication server
postfix/smtpd[1028]: disconnect from unknown[172.19.0.1] ehlo=1 auth=0/1 rset=1 quit=1 commands=3/4
postfix/smtpd[1066]: warning: unknown[172.19.0.1]: SASL LOGIN authentication failed: Connection lost to authentication server
postfix/smtpd[1066]: disconnect from unknown[172.19.0.1] ehlo=1 auth=0/1 rset=1 quit=1 commands=3/4
dovecot: auth: passwd-file(mathew@xn--...,172.19.0.1): unknown user (SHA1 of given password: 011c94)
postfix/smtpd[2295]: warning: unknown[172.19.0.1]: SASL LOGIN authentication failed: UGFzc3dvcmQ6
postfix/smtpd[2295]: disconnect from unknown[172.19.0.1] ehlo=1 auth=0/1 rset=1 quit=1 commands=3/4
postfix/postscreen[1020]: CONNECT from [172.19.0.1]:36922 to [172.19.0.11]:25
postfix/postscreen[1020]: PASS OLD [172.19.0.1]:36922
postfix/smtpd[1118]: connect from unknown[172.19.0.1]
postfix/postscreen[1020]: CONNECT from [172.19.0.1]:36948 to [172.19.0.11]:25
dovecot: auth: passwd-file(psycho@xn--...,172.19.0.1): unknown user (SHA1 of given password: 7c4a8d)
postfix/postscreen[1020]: CONNECT from [172.19.0.1]:36950 to [172.19.0.11]:25
postfix/smtpd[1118]: warning: unknown[172.19.0.1]: SASL LOGIN authentication failed: UGFzc3dvcmQ6
postfix/smtpd[1118]: disconnect from unknown[172.19.0.1] ehlo=1 auth=0/1 rset=1 quit=1 commands=3/4
postfix/postscreen[1020]: CONNECT from [172.19.0.1]:36958 to [172.19.0.11]:25
postfix/postscreen[1020]: PASS OLD [172.19.0.1]:36948
postfix/smtpd[2295]: connect from unknown[172.19.0.1]
postfix/postscreen[1020]: PASS OLD [172.19.0.1]:36950
postfix/smtpd[1066]: connect from unknown[172.19.0.1]

有什么可以让fail2ban基于IP地址阻止NAT后的SMTP (除了使用“暴露的主机”)吗?

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2019-11-18 20:43:56

由于路由器上的NAT,邮件容器似乎总是将路由器的IP作为源。

如果您能够从日志/日志中捕获到筛选器中的原始IP (或其他标识入侵者的内容),您可以:

还请注意类似的问题- 如何用Traefik实现fail2ban

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/58912519

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档