AskOverflow.Dev

AskOverflow.Dev Logo AskOverflow.Dev Logo

AskOverflow.Dev Navigation

  • 主页
  • 系统&网络
  • Ubuntu
  • Unix
  • DBA
  • Computer
  • Coding
  • LangChain

Mobile menu

Close
  • 主页
  • 系统&网络
    • 最新
    • 热门
    • 标签
  • Ubuntu
    • 最新
    • 热门
    • 标签
  • Unix
    • 最新
    • 标签
  • DBA
    • 最新
    • 标签
  • Computer
    • 最新
    • 标签
  • Coding
    • 最新
    • 标签
主页 / user-233676

Chathu's questions

Martin Hope
Chathu
Asked: 2020-07-01 07:20:15 +0800 CST

从 18.04 升级 Ubuntu 20.04 后 CSF 无法启动

  • 0

今天我已经将我的 Ubuntu 18.04.04 VPS 服务器升级到了 Ubuntu 20.04。现在 CSF 未启动并显示以下错误并且未启动 CSF 服务。

*Error* The path to iptables is either not set or incorrect for IPTABLES [/sbin/ip6tables] in /etc/csf/csf.conf at /usr/local/csf/lib/ConfigServer/URLGet.pm line 26.
Compilation failed in require at /usr/sbin/csf line 21.
BEGIN failed--compilation aborted at /usr/sbin/csf line 21.

当我测试 iptables 时,它显示以下结果。

root@server:~# sudo iptables -L -n -v
Chain INPUT (policy ACCEPT 0 packets, 0 bytes)
 pkts bytes target     prot opt in     out     source               destination    

Chain FORWARD (policy ACCEPT 0 packets, 0 bytes)
 pkts bytes target     prot opt in     out     source               destination    

Chain OUTPUT (policy ACCEPT 0 packets, 0 bytes)
 pkts bytes target     prot opt in     out     source               destination    
root@server:~# ip6tables -L
Chain INPUT (policy ACCEPT)
target     prot opt source               destination

Chain FORWARD (policy ACCEPT)
target     prot opt source               destination

Chain OUTPUT (policy ACCEPT)
target     prot opt source               destination

如何解决这个 CSF iptable 问题?

ubuntu-20.04 csf
  • 1 个回答
  • 1198 Views
Martin Hope
Chathu
Asked: 2019-08-27 21:37:00 +0800 CST

站点 iptables 后面的 Cloudflare 不阻止 HTTP 和 HTTPS 端口

  • 1

当 Fail2ban 触发 IP 禁止操作时,我想阻止我的 Ubuntu 服务器上的所有端口。现在,我使用banaction = iptables-allports和 CSF。此时它只阻止了 SSH 端口,即使我iptables-allports在 fail2ban 中使用。

我在 Cloudflare 反向代理后面遇到这个问题站点。

这是一个 Ubuntu 18.04 Nginx 服务器。我可以在 nginx 日志文件中查看访问者的 IP 地址。所以我相信X-Forwarded-Fornginx 配置中的这个 VPS 可以按预期工作。

当我通过 SSH 手动将 IP 地址添加到 CSF 临时禁止列表时,现在它再次没有阻止 HTTP 和 HTTPS 端口。此服务器支持 IPv4 和 IPv6。

当我搜索被阻止的 IP 时,它显示以下结果。

root@server:~# csf -g 43.250.242.xxx

Table  Chain            num   pkts bytes target     prot opt in     out     source               destination

filter TOR              174     22  1320 REJECT     all  --  *      *       43.250.242.xxx       0.0.0.0/0            reject-with icmp-port-unreachable
filter TOR              2        0     0 REJECT     all  --  *      *       43.250.242.xxx       0.0.0.0/0            reject-with icmp-port-unreachable
filter TOR              6        0     0 REJECT     all  --  *      *       43.250.242.xxx       0.0.0.0/0            reject-with icmp-port-unreachable


IPSET: Set:cc_lk Match:43.250.242.xxx Setting:CC_ALLOW_PORTS Country:LK


ip6tables:

Table  Chain            num   pkts bytes target     prot opt in     out     source               destination
No matches found for 43.250.242.xxx in ip6tables
iptables
  • 1 个回答
  • 563 Views
Martin Hope
Chathu
Asked: 2019-06-12 07:03:37 +0800 CST

Ubuntu 18.04 Nginx 服务器停止了 WordPress 站点的 auth.log 更新

  • 0

我可以看到我的 Ubuntu 18.04 Nginx /1.15.12 服务器停止在“ var/log/auth.log ”文件上记录 WordPress 站点登录(成功和失败)记录。此服务器正确记录 SSH 登录详细信息。

然后我将以下代码添加到“wp-config.php”但没有运气。

定义('WP_SYSLOG_CRITICITY_LEVEL','信息');

如何确定此错误的根本原因。

wordpress
  • 1 个回答
  • 66 Views
Martin Hope
Chathu
Asked: 2019-04-20 03:03:15 +0800 CST

Fail2ban 机器人搜索失败正则表达式不匹配错误日志格式

  • 0

我想禁止以下类型的机器人搜索。但是默认的nginx-botsearch.conf不匹配这个错误日志。

2019/04/19 12:42:22 [error] 1193#1193: *6 open() "/var/www/domain.com/htdocs/.well-known/dnt-policy.txt" failed (2: No such file or directory), client: 184.0.77.164, server: domain.com, request: "GET /.well-known/dnt-policy.txt HTTP/1.1", host: "domain.com"

然后我修改了默认的失败正则表达式如下。但它与上述失败日志不匹配。

failregex = ^ \[error\] \d+#\d+: \*\d+ (\S+ )?\"\S+\" (failed|is not found) \(2\: No such file or directory\), client\: <HOST>, server\: \S*\, request: \"(GET|POST|HEAD) \/".*?

我无法弄清楚哪个部分导致了这个错误。任何帮助表示赞赏。

fail2ban
  • 1 个回答
  • 182 Views
Martin Hope
Chathu
Asked: 2019-04-19 06:46:32 +0800 CST

如何删除 /?nonamp=1 URL nignx wordpress

  • 0

我想删除我的 WordPress 网站/?nonamp=1 URL 部分。因为 wordprss 显示此页面的 400 错误。Googlebot 会定期访问这些 URL。我想将上面的 url 参数重定向到清理 url。我的 URL 永久链接结构如下所示。

https://www.example.com/%year%/%monthnum%/%postname%.html

我创建了以下 nginx 重写规则。但它不适用于我的情况。当我调试 nginx 时,它显示

^( ./)/?nonamp=1$" 不匹配*

这是我的重写规则。

重写 ^(.*/)/?nonamp=1$ $1 永久;

你能告诉我这条规则有什么错误吗?

nginx
  • 1 个回答
  • 835 Views
Martin Hope
Chathu
Asked: 2014-09-24 20:36:34 +0800 CST

Ubuntu 12.04 VPS SSH 未运行,如何重置 SSH 配置文件?

  • 1

昨天我重新启用 root 用户并重新启动 VPS 后,现在 SSH 和 SFTP 没有运行。FTP 工作。我只能通过 VPS 提供商基于 Web 的控制台连接此 VPS。

当我在 VPS 提供程序控制台中运行“ssh restart”命令时,它会在“ssh_config”文件中显示“19 bad configuration option”。但我没有做那样的事。但是,错误的配置选项类似于默认配置文件。

那么如何在不丢失任何东西的情况下重置 ssh_config 文件呢?如果我重新安装打开的 SSH,它会将 ssh_config 文件重置为默认值。

ssh
  • 1 个回答
  • 5199 Views

Sidebar

Stats

  • 问题 205573
  • 回答 270741
  • 最佳答案 135370
  • 用户 68524
  • 热门
  • 回答
  • Marko Smith

    新安装后 postgres 的默认超级用户用户名/密码是什么?

    • 5 个回答
  • Marko Smith

    SFTP 使用什么端口?

    • 6 个回答
  • Marko Smith

    命令行列出 Windows Active Directory 组中的用户?

    • 9 个回答
  • Marko Smith

    什么是 Pem 文件,它与其他 OpenSSL 生成的密钥文件格式有何不同?

    • 3 个回答
  • Marko Smith

    如何确定bash变量是否为空?

    • 15 个回答
  • Martin Hope
    Tom Feiner 如何按大小对 du -h 输出进行排序 2009-02-26 05:42:42 +0800 CST
  • Martin Hope
    Noah Goodrich 什么是 Pem 文件,它与其他 OpenSSL 生成的密钥文件格式有何不同? 2009-05-19 18:24:42 +0800 CST
  • Martin Hope
    Brent 如何确定bash变量是否为空? 2009-05-13 09:54:48 +0800 CST
  • Martin Hope
    cletus 您如何找到在 Windows 中打开文件的进程? 2009-05-01 16:47:16 +0800 CST

热门标签

linux nginx windows networking ubuntu domain-name-system amazon-web-services active-directory apache-2.4 ssh

Explore

  • 主页
  • 问题
    • 最新
    • 热门
  • 标签
  • 帮助

Footer

AskOverflow.Dev

关于我们

  • 关于我们
  • 联系我们

Legal Stuff

  • Privacy Policy

Language

  • Pt
  • Server
  • Unix

© 2023 AskOverflow.DEV All Rights Reserve