我有一个问题可以找到我的覆盆子公共地址

发布于 2025-02-06 05:37:47 字数 262 浏览 0 评论 0原文

我创建了一个在Raspberry Pi上托管的本地Web应用程序。我想从外部访问本地网络之外的Web应用程序。 为此,我配置了DMZ,并且添加了Raspberry本地IP地址。

现在如何获得Raspberry公共IP地址?

我尝试使用bash命令:curl checkip.amazonaws.com。但是我得到的IP地址与我的计算机相同

?如何从外部访问覆盆子?

PS:我通过SSH控制着覆盆子,

谢谢:)

i Have created a local web app hosted on my raspberry pi. I want to access the web app from outside so outside the local network.
To do that, I have configured dmz and I have added my raspberry local ip address.

Now how can I get the raspberry public ip address?

I have tried to use the bash commands: curl checkip.amazonaws.com. But the ip address i get is the same as my computer

How can I solve it? how can i access the raspberry from outside?

P.S: I control my raspberry via ssh

thank you :)

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

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

发布评论

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

评论(1

夜空下最亮的亮点 2025-02-13 05:37:47

网络上的每个设备的公共地址都是相同的,因为它是本地网络之外的IP地址设备,请参见我所做的快速图所示。

如果要访问本地网络服务器,则需要告诉路由器将请求转发到给定的端口到本地网络地址。因此,假设您的网络服务器在端口80上运行,则需要告诉路由器将请求转发到192.168.1.50(假设您的RPI本地地址与该图匹配)

Your public address is the same for every device on your network because it's the IP address devices OUTSIDE of your local network see as illustrated by this quick diagram I've made.

enter image description here

If you want to access your local webserver you need to tell your router to forward requests to a given port to a local network address. So assuming your webserver is running on port 80 you need to tell your router to forward requests to 192.168.1.50 (assuming your RPi local address matches the diagram's) ????

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