Fourteenth-Day Adventist

  • 首页
  • 随笔
  • 隐私政策
  • RNGesus
  • 摄影画廊
ובחדש הראשון בארבעה עשר יום לחדש פסח ליהוה
ἐάν τι αἰτήσητέ με ἐν τῷ ὀνόματί μου ἐγὼ ποιήσω
  1. 首页
  2. Linux
  3. 正文

搬瓦工 Ubuntu 22.04 Fail2ban 没安装/无法启动 解决方案

2023/03/09 0人点赞 0条评论

最近新买了个搬瓦工服务器,用控制面板装了Ubuntu 22.04 LTS,默认的是精简版本,没觉得没什么问题省点硬盘挺好的,差点什么我自己装上就好了。

我首先开始安装fail2ban,但是直接人傻了,装了上去之后启动不来,一直提示

Failed during configuration: Have not found any log file for sshd jail

我还以为是搬瓦工改了默认配置把sshd的log放在了不同的地方,因为搬瓦工默认是改ssh端口+给你个随机密码的

但是看了半天没看到他重新改到了哪里.....

最后才发现是Minimized ubuntu根本就没log文件....只活在journalctl里....

你得自己去安装个软件包才有....

解决方案: sudo apt-get install rsyslog 或者 unminimize

I got bitten by this when I tried to configure fail2ban on a "minimal" Ubuntu 20.04 LTS image. On Ubuntu fail2ban looks for authentication events in /var/log/auth.log. However, in the "minimal" image only the systemd "journal" facility is available, the file auth.log is missing and then fail2ban won't start. To get the good old log files back, I installed rsyslog:

sudo apt-get install rsyslog

and then fail2ban started working properly.

Credit where credit is due: the idea for this solution came from @Bloodden 's answer which seems to be somewhat unfairly voted down...

https://unix.stackexchange.com/questions/108241/debian-auth-log-missing-from-var-log
标签: bug Linux 搬瓦工 服务器 编程
最后更新:2023/04/07

Fourteenth-Day Adventist

Two more weeks, trust the plan!

点赞
< 上一篇
下一篇 >

文章评论

razz evil exclaim smile redface biggrin eek confused idea lol mad twisted rolleyes wink cool arrow neutral cry mrgreen drooling persevering
取消回复

Fourteenth-Day Adventist

Two more weeks, trust the plan!

标签聚合
Linux Dugin 服务器 bug 随笔 编程 Duginism Global South

COPYRIGHT © 2022 Fourteenth-Day Adventist. ALL RIGHTS RESERVED.

Theme Kratos Made By Seaton Jiang