当我不在局域网中时连接到本地Web服务器 [英] Connecting to Local Web Server when I am Outside my LAN

查看:117
本文介绍了当我不在局域网中时连接到本地Web服务器的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的网络服务器不在家里.我在端口80上为其分配了一个地址,例如192.168.1.123.

I have a web server running out of my home. I have assigned it an address such as 192.168.1.123 on port 80.

我知道这是在我的本地网络上运行的.如果我转到网络上的另一台计算机并输入服务器的IP地址,则可以看到该服务器.

I understand that this is running on my local network. If I go to another computer on my network and type in the server's ip address, I can see the server.

是否可以从LAN外部访问此服务器?

Is there a way to access this server from outside my LAN?

推荐答案

是的,您需要将路由器设置为将到端口80的连接转发到内部IP地址(192.168.1.123).在您的路由器管理员屏幕上查找Port Forwarding,我想您会通过转到http://192.168.1.1

Yes, you need to set your router to forward connections to port 80 to your internal IP address (192.168.1.123). Look for Port Forwarding on your router admin screen which I would imagine you access by going to http://192.168.1.1

请记住,您的ISP可能会完全阻塞端口80,在这种情况下,您可以在其他端口(例如por 8180)上运行Web服务器,并使路由器将到端口8180的连接转发到内部IP.

Keep in mind that your ISP may block port 80 completely in which case you can run your web server on a different port (for example por 8180) and have your router forward connections to port 8180 to your internal IP.

要从外部访问服务器,您只需将浏览器指向您的外部IP地址即可,您可以通过访问 http://www.ipchicken.com

To access your server from outside, you just need to point your browser to your external IP address which you can find out by going to http://www.ipchicken.com

这篇关于当我不在局域网中时连接到本地Web服务器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆