简体   繁体   English

Raspberry Pi-No-IP DNS不起作用

[英]Raspberry Pi - No-IP DNS does not work

I want to use my raspberry pi's webserver all over the world. 我想在全世界使用我的raspberry pi的网络服务器。 so i decided to use no-ip DNS. 所以我决定使用无IP DNS。 I installed everything on my pi and started no ip with sudo noip2 . 我在pi上安装了所有内容,并没有通过sudo noip2开始ip。 I set up everything on the no-ip website (Hostname, address..) as well. 我也在no-ip网站上设置了所有内容(主机名,地址..)。

Then i checked with nslookup if the connection between my IP-Address and the No-Ip Domain is correct. 然后我用nslookup检查了我的IP地址和No-Ip域之间的连接是否正确。 Everything is ok. 一切都好。 But now when i type in my domain in my explorer, my webserver page does not appear. 但是现在当我在资源管理器中输入域时,不会出现我的网络服务器页面。

I think my router doesn't allow the connection. 我认为我的路由器不允许连接。 Can someone help me with the forwarding? 有人可以帮我转发吗? And what ports do i need? 我需要哪些端口? Or what else could be the problem? 还是其他问题?

Thanks 谢谢

EDIT 编辑

Im using a TP-Link TL-WR841N router. 我正在使用TP-Link TL-WR841N路由器。 On my RPi i have a Webserver with a mysql database running. 在我的RPi上,我有一个运行MySQL数据库的Web服务器。

I forward Port 80 to my RPi static IP address 192.168.1.190. 我将端口80转发到我的RPi静态IP地址192.168.1.190。

At home i have a router which is connected to the ISP. 在家里,我有一个连接到ISP的路由器。 1 cable is connected to the WLAN router which im talking about right now. 1根电缆已连接到WLAN路由器,现在我正在谈论。 so it is possible that my WLAN router is not the problem, but the router which is connected to the ISP? 因此,可能是我的WLAN路由器不是问题,而是连接到ISP的路由器吗? I have 2 routers because the routers are on different floors. 我有2个路由器,因为路由器位于不同的楼层。

SOLUTION

Its working right now! 它现在正在工作! I had to open the Port 80 also on my second router which is directly connected to the Internet. 我还必须在直接连接到Internet的第二个路由器上打开端口80。

I have a raspberry PI working fine with no-ip DNS. 我有一个树莓派PI可以与无IP DNS一起正常工作。 To help you first answer this questions please: 为了帮助您首先回答此问题,请:

1) Could you describe your router (trademark). 1)您能描述一下您的路由器(商标)吗? 2)What port(s) are you using for your application (HTTP: 80, SSH: 22, WEBCAM...) 2)您正在为应用程序使用哪些端口(HTTP:80,SSH:22,WEBCAM ...)

It's not working due to the forwarding action you mentioned. 由于您提到的转发操作,它不起作用。 You need to forward your ports to a private IP that your raspberru PI has in order to access you device. 您需要将端口转发到raspberru PI具有的专用IP才能访问设备。 I also recommend you put a static IP to your raspberry PI, so you wont have to do this every once in a while. 我还建议您在树莓派PI上放置一个静态IP,这样就不必偶尔执行此操作。

My Raspberry works fine with noip. 我的Raspberry使用noip可以正常工作。

This is a good link for how to set up the DUC client. 这是有关如何设置DUC客户端的良好链接。 http://trzebinski.info/noip-daemon-autostart-after-system-restart-on-raspberry-pi-raspbian/ http://trzebinski.info/noip-daemon-autostart-after-system-restart-on-raspberry-pi-raspbian/

The link covers getting noip2 to start on boot. 该链接介绍了如何使noip2在启动时启动。 It provides a startup script /etc/init.d/noip2 (owned by root with 755 permissions). 它提供了一个启动脚本/etc/init.d/noip2(拥有755权限的root用户拥有)。 When this is called with a commandline argument 'start' it will execute: 当使用命令行参数'start'调用它时,它将执行:

start-stop-daemon --start --exec /usr/local/bin/noip2

Finally after creating the script execute: 最后在创建脚本之后执行:

update-rc.d /etc/init.d/noip2 defaults 90

Which will ensure the startup script gets run at boot time. 这将确保启动脚本在启动时运行。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM