Domain name for my PC: how to (tried No-IP, DuckDNS and ngrok)

让人想犯罪 __ 提交于 2019-11-28 01:41:30

I wasted lots of time with No-Ip and DuckDNS. They all claims they're as easy as possible, but that's not the truth. Finally instead of configuring my router and having lots of hemorrhoids with God knows what, I used ngrok - 30 seconds and vu a la! All you need to do is:

  1. Download
  2. Run it: ./ngrok subdomain=<your_domain_name> <your_server_port>

The port forward that you set up will not allow you to use ping (in that case, you're doing an ICMP forward). But it looks like you don't want to ping, but rather access a web page on port 3000.

Troubleshooting steps:

Try it locally first - on another computer on your home network, try to reach http://<internal_ip_address>:3000/, in your question this would be http://200.300.1.15:3000/. If that doesn't work, none of the rest will work - check to make sure your computer's firewall is allowing incoming TCP requests on port 3000 (or turn the firewall off for testing).

Next, try it directly by your IP from outside your home - http://94.154.220.216:3000/. If local works but this doesn't, then your port forward it not working, ISP is blocking incoming TCP requests, or something else.

And then finally, ping my_domain.duckdns.org, and make sure it resolves to your IP (94.154.220.216). At that point you should be able to hit http://my_domain.duckdns.org without a problem.

If you are at your home trying to set this up, most likely your PC has a private IP address (10.0.x.x. or 192.168.xx ...). When you set up your DynDNS service you are only pointing to your router. You need to configure your router or PC so that your PC has a static IP address. If you plan on taking your PC off your network and connect it into another more than once or twice I would recommend setting up the router to assign your PC a static IP address. If not you can make your PC have a static IP address in the network settings. Then set up Port Forwarding on the router. Each router has different ways to set this up. look in your manual for your router for the steps required.

I had a problem setting up DuckDNS as well. Here's some notes that would have helped me:

  1. Head to: https://www.duckdns.org
  2. Login with one of the 3rd party authentication sites. e.g. google plus, FB, etc... It's lame but it means that the DD guys don't have to create and manage a user DB.
  3. Add a free sub-domain.
  4. Click the install instructions for your server/OS/router. I was using DD-WRT. Get your token in there, and make sure your URL has the sub-domain you picked.
  5. Follow the instructions. Make sure you get an OK at the end of your logs and not a KO. Double check if you get KO.

Be patient. Dynamic DNS support will update public records, but it take a bit of time to propagate to the DNS you're actually using. It took about 10 minutes before I was able to ping my public IP. Pinging my not work for you if you're dropping it, it all depending on what you're doing. You can also nslookup .duckdns.org. Once it comes back with your public IP you know it's working.

Time will tell if DuckDNS is reliable, but it works.

Your router may have a NAT loopback problem, in that case you will never be able to connect to your dynamic hostname from within your own network. Workaround use a mobile phone with an internet subscription.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!