(What is Dynamic DNS)您可能会问什么是动态 DNS ?基本上(Basically),动态DNS是由第三方提供商提供的服务,通过该服务,ISP 提供的不断变化的IP地址(ISP)会(IP address)定期更新,并与公司提供的主机名相关联。如果您在家中有宽带Internet 连接,那么您很可能拥有动态(Internet connection)IP 地址(IP address)。
与从不更改的静态IP 地址(IP address)相比,动态IP 地址经常更改。(IP address)通常,在您尝试从家庭网络外部连接到本地设备之前,更改(home network)IP 地址(IP address)不会导致任何问题。使用不断变化的IP 地址(IP address),您可能可以连接几次,但在IP 地址(IP address)更新后就不行了。
那么,为什么您首先要在Internet上找到您的计算机呢?好吧,您可能想知道您的动态IP 地址(IP address)有几个原因:
1.通过(1.) 远程桌面连接(Remote Desktop Connection and access)连接(Connect)到您的计算机并访问您的文件
2. 将音频和视频(Stream audio and video)从您的家庭媒体服务器流式传输到世界上的任何位置
3. 从任何地方查看(View)和控制IP cam
知道您的IP 地址(IP address)可能有用的原因还有很多。那么为什么不是每个人都有一个静态IP 地址(IP address)呢?好吧,对于ISP来说,将(ISPs)IP 地址(IP address)轮换给他们的客户基本上要便宜得多。如果您想要一个静态IP 地址(IP address),您将不得不支付额外的每月费用,而且大多数ISP(ISPs)甚至不会将它们提供给住宅客户。
动态 DNS
这就是动态DNS发挥作用的地方。使用此服务,理论上您可以为您的家用电脑创建一个静态(home computer)IP 地址(IP address)。这是它的工作原理。当您访问Internet(Internet)上的任何网站时,您可以输入IP 地址(IP address)或输入域名(domain name),例如 www.online-tech-tips.com。世界各地都有DNS服务器跟踪哪些名称对应于哪些数字(DNS)IP 地址(IP address)。
当您访问一个网站时,您的计算机首先从DNS 服务器(DNS server)查找IP 地址(IP address),然后请求该站点。这对于具有永远不会更改的静态IP 地址(IP address)的服务器来说非常有用,但它不太适合在家庭宽带(home broadband)连接上的服务器。这意味着您的服务器在Internet上不断“移动” ,它打乱了域名和IP 地址之间(IP address)的一对一关系(one-to-one relationship)。
设置动态DNS的解决方案,(DNS)第三方服务器(party server)借此跟踪其当前IP 地址(IP address),并在您输入您的唯一域名(domain name)时提供此信息。通过这种方式,您可以给您的动态IP 地址(IP address) 一个虚拟静态IP 地址(IP address)。连接到您的计算机时,您可以输入域名(domain name)或 ping域名(domain name)以查找当前IP 地址(IP address)。
域名始终是您设置帐户的公司的子域。例如,动态DNS服务提供商之一是 no-ip.com。因此,当您注册并创建主机名时,它最终会看起来像 aseemkishore.no-ip.com。第一部分是您想要的任何东西,只要其他人还没有接受它。
为了确定您当前的IP 地址(IP address),所有这些服务都以两种方式之一工作:要么在计算机上安装一个不断更新其服务器的软件,要么在路由器上配置服务(如果支持)。很多较新的路由器都内置了 DynDNS(DynDNS built-in)等动态DNS 提供程序(DNS provider),因此您可以让路由器在动态 DNS 提供程序更改时自动将IP 地址(IP address)更新为动态DNS 提供程序(DNS provider)。
如何设置动态 DNS
最好的动态DNS提供商之一是DynDNS ,但他们最近在 2014 年取消了所有免费计划。他们的远程(DynDNS)访问计划(access plan)每年只需 25 美元,这对于您获得的功能来说相当便宜,但它仍然不是免费的!
如果您真的打算从世界各地进行大量远程连接,并且想要一些非常可靠的东西,那么DynDNS绝对值得付费。
但是,有几个免费选项可以做得很好,并且对大多数人来说都很好。我要写一下我目前最喜欢的,即 no-ip.com。我还将在帖子底部提及更多内容。
无IP
no-ip提供的免费动态 DNS包括最多 3 个主机名、电子邮件支持、动态DNS更新(显然)以及URL 和端口(URL & Port)80 重定向。拥有多个主机名是一个很好的功能,以防您有多个要远程访问的设备并且您希望每个设备具有不同的主机名。这些设备也可以有不同的位置,因此您可以使用一个主机名连接到家中的计算机,而使用另一个主机名连接到工作中的计算机。
要开始,请单击立即注册(Sign Up)按钮并创建您的帐户。系统会要求您输入一个主机名,您可以输入它或选择稍后创建它。
您将收到一封确认电子邮件(confirmation email),登录该网站后,您将被带到会员区(member area),并且会出现一个弹出窗口,其中包含您接下来必须采取的步骤。
接下来要做的是下载更新客户端,因为该工具会使用您当前的动态IP 地址(IP address)不断更新无 IP 服务器。
如果登录时没有出现弹出窗口(popup doesn),您只需单击左侧菜单中的(hand menu)动态更新客户端(Dynamic Update Client)即可。它将自动确定您的操作系统并显示适用于Mac、Windows等的正确下载。
运行后,您需要首先使用您的无 IP 凭据登录,如下所示。
完成此操作后,您将收到一些有关选择主机的消息。它将列出您创建的主机名,因此只需选中您想要的主机名旁边的框。
我建议的唯一另一件事是单击“守护程序(Daemon)”选项卡并单击“开始(Start)”按钮,并选中“在系统启动时启动守护程序(Launch Daemon at System Startup)”框。如果您这样做,您根本不必运行客户端更新程序,因为会有这个后台应用程序(background application)会自动进行更新。
如果您不启动Daemon,则需要始终保持更新后的程序运行。它只会放在您的桌面上并告诉您当前状态。
您还可以单击“设置”(Settings)选项卡并选中复选框以在登录时启动更新程序。但是,我发现只使用守护程序更方便,根本不用担心更新的应用程序。
您现在应该能够简单地 ping 主机名(在我的例子中为 akishore.ddns.net)并获得正确的动态IP 地址(IP address)。您还可以通过单击成员区域中的添加主机( Add a Host)按钮来添加更多主机名。
默认情况下,您创建的第一个主机名使用DNS Host (A)作为Host Type。这几乎是 99% 的用户会使用的。如果您将鼠标悬停在设置旁边的小问号上,您将获得有关每个选项的更多详细信息。
如果您正在运行Web 服务器(web server),并且您的ISP阻止了端口 80(port 80)上的传入流量,很多ISP(ISPs)都会这样做,那么您可以选择Port 80 Redirect。您基本上在不同的端口上运行您的Web 服务器(web server),然后在 no-ip 设置中指定该端口号。(port number)用户无需在URL中输入(URL)端口号(port number)即可连接到Web 服务器(web server)。
Web Direct只会将用户重定向到您想要的任何URL。这个选项显然不能用于远程连接,因为它只是重定向到另一个URL。
跳过页面上的所有(Skip everything)其他内容,然后单击(page and click)Add Host。您现在可以在另一台机器上下载客户端软件(client software),并为更新程序的特定实例选择新主机名。(host name)
请注意,您只完成了设置对本地网络上设备的远程访问的一步。您现在必须将路由器上的相应端口转发到网络上的相应设备。幸运的是,我已经写了大量关于端口转发(port forwarding)以及如何在路由器上配置它的文章。
就是这样。运行动态DNS 并(DNS running and port)设置端口转发后,您可以使用带有端口号(port number)( akishore.ddns.net:3389 ) 的新主机名连接到计算机或网络摄像头(computer or webcam)或其他任何东西。
正如我之前所说,no-ip 不是动态DNS的唯一选择。这里还有一些评价不错的。
https://www.dnsdynamic.org/
https://duckdns.org/install.jsp
http://www.changeip.com/services/free-dynamic-dns/
设置动态DNS后的过程可能有点复杂,所以如果您有任何问题,请随时发表评论。享受!
How to Setup Free Dynamic DNS for Remote Access to Your PC
What is Dynamic DNS you might be asking? Basically, dynamic DNS is a service provided by third-party providers whereby a constantly changing IP address given by an ISP is updated regularly and associated with a hostname given by the company. If you have a broadband Internet connection at home, you more than likely have a dynamic IP address.
A dynamic IP address changes every so often, as compared to a static IP address, which never changes. Normally, a changing IP address does not cause any problem until you try to connect to a local device from outside of your home network. With a constantly changing IP address, you may be able to connect a few times, but not after the IP address updates.
So why would you want to find your computer on the Internet in the first place? Well there are several reasons why you may want to know your dynamic IP address:
1. Connect to your computer via Remote Desktop Connection and access your files
2. Stream audio and video from your home media server to any location in the world
3. View and control an IP cam from anywhere
There are many more reasons why it could be useful to know your IP address. So why doesn’t everyone have a static IP address? Well, it’s basically a lot cheaper for ISPs to keep rotating IP addresses to their clients. If you want a static IP address, you will have to pay an extra monthly charge and most ISPs won’t even offer them to residential customers.
Dynamic DNS
That’s where dynamic DNS comes into play. Using this service, you can theoretically create a static IP address for your home computer. Here’s how it works. When you visit any web site on the Internet, you can either type in the IP address or you can enter in the domain name, like www.online-tech-tips.com. There are DNS servers all over the world that keep track of which names correspond to which numeric IP addresses.
When you visit a website, your computer first looks up the IP address from a DNS server and then requests the site. This is great for servers that have static IP addresses that never change, but it’s not well suited for servers that are on home broadband connections. This means that your server is constantly “moving” on the Internet and it messes up the one-to-one relationship between domain names and IP addresses.
The solution to setup dynamic DNS, whereby a third party server keeps track of what its current IP address is and gives out this information when you type in your unique domain name. In this way, you can give your dynamic IP address a virtual static IP address. When connecting to your computer, you would either type in the domain name or you would ping the domain name to find the current IP address.
The domain names are always subdomains of the company you are setting up an account with. For example, one provider of dynamic DNS services is no-ip.com. So when you register and create a hostname, it would end up looking something like aseemkishore.no-ip.com. The first part is whatever you want as long as someone else already hasn’t taken it.
In order to determine your current IP address, all of these services work in one of two ways: either you install a piece of software on your computer that constantly updates their servers or you configure the service on your router, if it is supported. A lot of newer routers have dynamic DNS providers like DynDNS built-in, so you can have the router automatically update the IP address to the dynamic DNS provider when it changes.
How to Setup Dynamic DNS
One of the best dynamic DNS providers was DynDNS, but they recently removed all their free plans in 2014. It’s only $25 a year for their remote access plan, which is pretty cheap for the features you get, but it’s still not free!
If you really plan to connect remotely a lot from different parts of the world and you want something very reliable, DynDNS is definitely worth paying for.
However, there are several free options that do a pretty good job and will work just fine for most people. I’m going to write about my current favorite, which is no-ip.com. I’ll also mention a couple of more at the bottom of the post.
no-ip
The free dynamic DNS provided by no-ip includes up to 3 hostnames, email support, dynamic DNS updates (obviously) and URL & Port 80 redirects. Having multiple hostnames is a nice feature in case you have multiple devices you want to remotely access and you want a different hostname for each device. The devices can also have different locations, so you could use one hostname to connect to a computer at home and another to connect to a computer at work.
To get started, click on the Sign Up Now button and create your account. You’ll be asked for one hostname and you can type it in or choose to create it later.
You’ll get a confirmation email and once you log into the site, you’ll be brought to the member area and a pop up will appear with the steps you have to take next.
The next thing to do is to download the update client, as that is the tool that will constantly update the no-ip servers with your current dynamic IP address.
If the popup doesn’t appear when you login, you can just click on Dynamic Update Client in the left hand menu. It will automatically determine your OS and show the correct download for Mac, Windows, etc.
After running it, you’ll need to first login with your no-ip credentials as shown below.
Once you do that, you’ll get some message about select a host. It will list out the host names you have created, so just check the box next to the one you want.
The only other thing I would suggest is clicking on the Daemon tab and clicking the Start button and also checking the Launch Daemon at System Startup box. If you do this, you won’t have to run the client update program at all since there will be this background application that will do the updating automatically.
If you don’t start the Daemon, you’ll need to keep the updated program running all the time. It’ll just sit on your desktop and tell you the current status.
You can also click on the Settings tab and check the box to start the updater program when logging in. However, I have found it much more convenient to just use the daemon and not worry about the updated app at all.
You should now be able to simply ping the hostname (akishore.ddns.net in my case) and get the correct dynamic IP address. You can also add more hostnames by clicking the Add a Host button from the member area.
By default, the first hostname you created used the DNS Host (A) for the Host Type. This will be pretty much what 99% of users will use. If you hover over the little question marks next to the settings, you’ll get more detailed information on each of the options.
If you are running a web server and your ISP has blocked incoming traffic on port 80, which a lot of ISPs do, then you can select Port 80 Redirect. You basically run your web server on a different port and then specify that port number in the no-ip settings. The user will not have to type in the port number in the URL in order to connect to the web server.
Web Direct will simply redirect the user to any URL that you want. This option cannot be used for remote connections obviously since it’s just redirecting to another URL.
Skip everything else on the page and click on Add Host. You can now download the client software on another machine and choose the new host name for that particular instance of the updater program.
Note that you have only completed one step in setting up remote access to a device on your local network. You now have to forward the appropriate ports on your router to the appropriate devices on your network. Luckily, I’ve already written extensively on port forwarding and how you can configure it on your router.
That’s about it. Once you have dynamic DNS running and port forwarding setup, you can use your new hostname with a port number (akishore.ddns.net:3389) to connect to a computer or webcam or anything else.
As I said earlier, no-ip isn’t the only option for dynamic DNS. Here are a couple more that have good reviews.
https://www.dnsdynamic.org/
https://duckdns.org/install.jsp
http://www.changeip.com/services/free-dynamic-dns/
The process after setting up dynamic DNS can be a bit complicated, so if you have any questions, feel free to post a comment. Enjoy!