I want: ping server on my PC by it domain name from remote.
I have:
- DynDNS services DuckDns (or No-IP, config in no-ip is even harder). It gets me an IP
94.154.220.216
and (sub)domainhttp://my_domain.duckdns.org
. To configureDuckDNS
on PC I need just specify some token and my domain name (my_domain
). - Also I've launched server on
lacalhost:3000
. - Also when I go to CanYouSeeMee it says that my IP is
94.154.220.216
(that's good). - And I configured static IP for my PC (let's say
200.300.1.15
) - And Setting port forwarding for with help of Port Forwarding Wizard (Port=
3000
, Protocol=TCP, Internal IP =200.300.1.15
)
Problem: I can't get neither http://my_domain.duckdns.org
nor http://my_domain.duckdns.org:3000
from remote.
Assumption: I assume that troubles are in router configurations.
Questions:
- How can I check what is wrong? Means whether DuckDNS doesn't redirect request to my router or my router don't redirect request to my PC.
My local network scheme:
Internet <==> 1st Router <==> My PC
static IP static IP: (let's say 200.300.1.15)
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:
- Download
- 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:
- Head to: https://www.duckdns.org
- 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.
- Add a free sub-domain.
- 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.
- 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.
来源:https://stackoverflow.com/questions/27304810/domain-name-for-my-pc-how-to-tried-no-ip-duckdns-and-ngrok