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-943668

Laughing Laugh wwwwwww's questions

Martin Hope
stereophonicSound
Asked: 2022-12-13 06:29:49 +0800 CST

Wireguard 不工作:“wg0”不是 WireGuard 接口

  • 5

我有 wireguard 的问题。我有一个基于 debian 的 VPS 和一个 Manjaro 客户端。这是我/etc/wireguard/wg0.conf的服务器:

[Interface]
Address = 10.0.0.1/24
ListenPort = 194
PrivateKey = <ServerPrivateKey>
PostUp = iptables -A FORWARD -i %i -j ACCEPT; iptables -A FORWARD -o %i -j ACCEPT; iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE
PostDown = iptables -D FORWARD -i %i -j ACCEPT; iptables -D FORWARD -o %i -j ACCEPT; iptables -t nat -D POSTROUTING -o eth0 -j MASQUERADE

[Peer]
PublicKey = <ClientPublicKey>
AllowedIPs = 10.0.0.2/32

这是我/etc/wireguard/wg0.conf的一个客户:

[Interface]
Address = 10.0.0.2/32
PrivateKey = <ClientPrivateKey>

[Peer]
PublicKey = <ServerPublicKey>
Endpoint = <ServerIP>:194
AllowedIPs = 0.0.0.0/0, ::/0

这是我的ufw status输出:

Status: active

To                         Action      From
--                         ------      ----
22                         ALLOW       Anywhere                  
443                        ALLOW       Anywhere                  
80                         ALLOW       Anywhere                  
143                        ALLOW       Anywhere                  
993                        ALLOW       Anywhere                  
51820                      ALLOW       Anywhere                  
IMAPS                      ALLOW       Anywhere                  
POP3                       ALLOW       Anywhere                  
SMTP                       ALLOW       Anywhere                  
194                        ALLOW       Anywhere                  
22 (v6)                    ALLOW       Anywhere (v6)             
443 (v6)                   ALLOW       Anywhere (v6)             
80 (v6)                    ALLOW       Anywhere (v6)             
143 (v6)                   ALLOW       Anywhere (v6)             
993 (v6)                   ALLOW       Anywhere (v6)             
51820 (v6)                 ALLOW       Anywhere (v6)             
IMAPS (v6)                 ALLOW       Anywhere (v6)             
POP3 (v6)                  ALLOW       Anywhere (v6)             
SMTP (v6)                  ALLOW       Anywhere (v6)             
194 (v6)                   ALLOW       Anywhere (v6)

这是我的lsmod | grep wireguard输出:

wireguard              94208  0
curve25519_x86_64      36864  1 wireguard
libchacha20poly1305    16384  1 wireguard
ip6_udp_tunnel         16384  1 wireguard
udp_tunnel             20480  1 wireguard
libcurve25519_generic    49152  2 curve25519_x86_64,wireguard

在服务器wg-quick up wg0上之后wg-quick down wg0我遇到了这个错误:
wg-quick: `wg0' is not a WireGuard interface
我敢肯定,错误在我这边。但是我错在哪里了?

linux
  • 1 个回答
  • 46 Views
Martin Hope
Laughing Laugh wwwwwww
Asked: 2021-12-08 01:52:38 +0800 CST

无法访问我的网站

  • 0

每个人!我是 linux 爱好者,我对 debian VPS 上的 nginx 有疑问。直到最近我可以访问我的静态网站,但现在我不能。

这是我的用户名sites-available/example在哪里example:

server {
        listen 80 ;
        listen [::]:80 ;
        server_name example.com ;
        root /var/www/example ;
        index index.html index.htm index.nginx-debian.html ;
        location / {
                try_files $uri $uri/ =404 ;
        }
}

sites-available/example有符号链接sites-enabled

我的nginx/error.log:

2021/12/07 08:57:02 [notice] 7383#7383: signal process started
2021/12/07 09:22:00 [notice] 2195#2195: signal process started

在signal process started我遇到 403 或 404 错误之前:

2021/12/05 17:53:05 [emerg] 12400#12400: open() "/etc/nginx/sites-enabled/mail" failed (2: No such file or directory) in /etc/nginx/nginx.conf:62
2021/12/05 17:55:01 [emerg] 12415#12415: open() "/etc/nginx/sites-enabled/mail" failed (2: No such file or directory) in /etc/nginx/nginx.conf:62
2021/12/05 18:02:33 [emerg] 12468#12468: open() "/etc/nginx/sites-enabled/mail" failed (2: No such file or directory) in /etc/nginx/nginx.conf:62
2021/12/05 18:05:15 [error] 12522#12522: *1 directory index of "/var/www/mail/" is forbidden, client: 212.16.10.194, server: mail.example.com, request: "GET / HTTP/1.1", host: "example.com"
2021/12/05 18:07:45 [error] 12562#12562: *1 directory index of "/var/www/mail/" is forbidden, client: 212.16.10.194, server: mail.example.com, request: "GET / HTTP/1.1", host: "example.com"

我什至重新安装了 nginx,但我仍然无法访问我的网站。我应该怎么做或在哪里搜索信息来解决这个问题?

sudo ss -tnlp|grep :80显示了这一点:

LISTEN 0 128 0.0.0.0:80 0.0.0.0:* users:(("nginx",pid=2524,fd=6),("nginx",pid=2522,fd=6))

LISTEN 0 128 [::]:80 [::]:* users:(("nginx",pid=2524,fd=7),("nginx",pid=2522,fd=7))

debian nginx http-status-code-404 http-status-code-403
  • 1 个回答
  • 188 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