Linux之路


mysql

源码安装mysql,添加到开机自启

ip黑名单

  • vim /etc/hosts.deny
  • ALL: 119.145.254.194
    • sshd: 拒绝 SSH 服务连接
    • ftp: 拒绝 FTP 服务连接
    • telnet: 拒绝 Telnet 服务连接
    • httpd: 拒绝 HTTP(Web)服务连接
    • smtpd: 拒绝 SMTP(邮件)服务连接

查看ip登录失败次数

  • grep 'Failed password' /var/log/secure |grep -Po "((2(5[0-5]|[0-4]\d))|[0-1]?\d{1,2})(\.((2(5[0-5]|[0-4]\d))|[0-1]?\d{1,2})){3}" | sort -n | uniq -c | sort -n
    
    
    
    -   
    
    
    
    ## Ubuntu上安装Apache
    
    **安装 Apache HTTP 服务器**:
    

sudo apt update
sudo apt install apache2


**将文件放在 Apache 服务器的根目录**: 将 `JspSpy.jsp.txt` 文件复制到 `/var/www/html` 目录下:

sudo cp /path/to/JspSpy.jsp.txt /var/www/html/


**配置防火墙**(如有必要): 确保端口 `8080` 是开放的。你可以使用 `ufw` 配置防火墙:

sudo ufw allow 8080/tcp


**配置 Apache 监听端口 8080**: 编辑 `/etc/apache2/ports.conf` 文件,添加以下内容:

Listen 8080


然后编辑 `/etc/apache2/sites-available/000-default.conf` 文件,将 `<VirtualHost *:80>` 改为 `<VirtualHost *:8080>`。

**重启 Apache 服务器**:

sudo systemctl restart apache2


文章作者: cunshao
版权声明: 本博客所有文章除特別声明外,均采用 CC BY 4.0 许可协议。转载请注明来源 cunshao !
  目录