无法从外部计算机通过服务器的公共 IP 访问 VPS 上的 Apache2

无法从外部计算机通过服务器的公共 IP 访问 VPS 上的 Apache2
root@Client13:/etc/apache2# netstat -anltp | grep "LISTEN "
tcp        0      0 0.0.0.0:80              0.0.0.0:*               LISTEN      104129/apache2
tcp        0      0 0.0.0.0:22              0.0.0.0:*               LISTEN      65242/sshd: /usr/sb
tcp6       0      0 :::22                   :::*                    LISTEN      65242/sshd: /usr/sb
root@Client13:/etc/apache2#

Apache 正在运行并监听端口 80。我可以从运行 Apache2 的计算机使用 curl 或 wget 连接到该页面,但是当我尝试从另一台计算机连接到公共 IP 地址时,它不起作用并且我无法访问该页面。

注意:操作系统:Debian 11 UFW 未安装所有 IP 表规则,即 iptables 没有阻止任何东西我可以使用相同的公共 IP 通过 SSH 连接到 TCP 端口 22,但是运行 Apache2 时,我无法在同一 IP 的端口 80 上访问它。

iptables -L -n 的输出:

Chain INPUT (policy ACCEPT)
target     prot opt source               destination

Chain FORWARD (policy DROP)
target     prot opt source               destination

Chain OUTPUT (policy ACCEPT)
target     prot opt source               destination

Chain DOCKER (0 references)
target     prot opt source               destination

Chain DOCKER-ISOLATION-STAGE-1 (0 references)
target     prot opt source               destination

Chain DOCKER-ISOLATION-STAGE-2 (0 references)
target     prot opt source               destination

Chain DOCKER-USER (0 references)
target     prot opt source               destination

Chain ufw-after-forward (0 references)
target     prot opt source               destination

Chain ufw-after-input (0 references)
target     prot opt source               destination

Chain ufw-after-logging-forward (0 references)
target     prot opt source               destination

Chain ufw-after-logging-input (0 references)
target     prot opt source               destination

Chain ufw-after-logging-output (0 references)
target     prot opt source               destination

Chain ufw-after-output (0 references)
target     prot opt source               destination

Chain ufw-before-forward (0 references)
target     prot opt source               destination

Chain ufw-before-input (0 references)
target     prot opt source               destination

Chain ufw-before-logging-forward (0 references)
target     prot opt source               destination

Chain ufw-before-logging-input (0 references)
target     prot opt source               destination

Chain ufw-before-logging-output (0 references)
target     prot opt source               destination

Chain ufw-before-output (0 references)
target     prot opt source               destination

Chain ufw-reject-forward (0 references)
target     prot opt source               destination

Chain ufw-reject-input (0 references)
target     prot opt source               destination

Chain ufw-reject-output (0 references)
target     prot opt source               destination

Chain ufw-track-forward (0 references)
target     prot opt source               destination

Chain ufw-track-input (0 references)
target     prot opt source               destination

Chain ufw-track-output (0 references)
target     prot opt source               destination

nmap ip -p80,443 -Pn 的输出

Nmap scan report for public (x.x.x.x)
Host is up.

PORT    STATE    SERVICE
80/tcp  filtered http
443/tcp filtered https

Nmap done: 1 IP address (1 host up) scanned in 3.08 seconds

相关内容