尽管我可以在 22 上进行 SSH 并 ping 服务器 IP,但无法访问我的 Oracle 云实例上的 Web 服务器

发布于 2025-01-17 07:37:27 字数 1549 浏览 3 评论 0原文

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

余生共白头 2025-01-24 07:37:27

默认情况下,每个 Oracle 实例都配有 2 个防火墙。

  1. 硬件防火墙(称为 VCN)
  2. 软件防火墙(它们使用非常严格的 iptables 规则,常规的 ufw 无法使用它。)

第二个选项非常烦人,也花了我大约 3 天的时间来解决我的问题。您可以按照我的以下说明进行操作,希望它也能解决您的问题。

首先,您必须打开硬件防火墙 (VCN) 上的端口,当您认为已打开该端口时,请使用 ssh 登录服务器,使用此命令清除默认的 oracle iptables 规则。

sudo iptables -F

但请记住,每当您重新启动服务器时,您都需要再次运行 flash 命令。因此,如果您不想每次服务器重新启动后都运行此命令。然后运行 ​​flash 命令后运行此命令来保存刷新的 iptables 规则。

sudo netfilter-persistent save

因此,您不需要每次在服务器启动时都运行 iptables falsh 命令。

By default every oracle instances come with 2 firewall.

  1. Hardware Firewall (Known as VCN)
  2. Software Firewall (They use a very hard iptables rules and regular ufw doesn't work with that.)

The 2nd option is very annoying and also took me about 3 days to solve my problem. You can follow my following instructions and hopefully it will also fix your problem.

1st you have to open the port on the Hardware Firewall (VCN) and when you believe you have opened the port then by login to the server using ssh use this command to clear the default oracle iptables rule.

sudo iptables -F

But remember whenever you will reboot the server you will need to again run the flash command. So if you don't want to run this command every time after server reboot. Then after running the flash command run this command to save your flashed iptables rules.

sudo netfilter-persistent save

So, you will not need to run the iptables falsh command every time on the startup of the server.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文