【发布时间】:2022-07-30 06:43:02
【问题描述】:
我正在使用oracle cloud创建一个http服务器来学习,所以我是新手。感谢您的帮助!
实例信息
Image: Canonical-Ubuntu-20.04-2022.02.15-0
Shape: VM.Standard.E2.1.Micro
已在子网(7500 端口)上添加入口规则: Picture of subnet
Source IP Protocol Source Port Range Destination Port Range Allows
0.0.0.0/0 TCP All 7500 TCP traffic for ports: 7500
使用python创建http服务器:
python3 -m http.server 7500 &
正在显示:
ubuntu@tcp-server:~$ Serving HTTP on 0.0.0.0 port 7500 (http://0.0.0.0:7500/) ...
调用lsof -i 返回
COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME
python3 1806 root 3u IPv4 33281 0t0 TCP *:7500 (LISTEN)
ufw 上允许 7500 端口:
ufw Status: active
To Action From
7500 ALLOW Anywhere
7500 (v6) ALLOW Anywhere (v6)
但我无法访问 public_Ip_address:7500。
使用远程登录:
sudo telnet 152.69.123.118 7500
返回:
Trying 152.69.123.118...
并没有连接
提前致谢!
【问题讨论】: