DynamicDNS

来自Ubuntu中文
跳到导航跳到搜索

原文出处:https://help.ubuntu.com/community/DynamicDNS

原文作者:UbuntuWiki

授权许可:

翻译人员:Murodoch

校对人员:purewind

贡献者:purewind

适用版本:

文章状态:完成


Dynamic DNS (动态域名解析服务)

Every computer which is attached to the internet has an IP address. DNS is the process of assigning a name to an IP address.

任何一台接入到互联网的机器都拥有自己的IP地址。而DNS是指定域名给一个IP地址的过程。(域名便于人们的记忆,但机器之间只能识别IP地址,因此就需要一台服务器来将域名转换成对应的IP地址)

Most home users do not get a single IP address from their Internet Service Provider. A different IP address can get assigned to them every time the connect to the internet. To assign a host name (URL) to an ever-changing IP address is called Dynamic DNS.

大部分家庭用户从他们的互联网服务提供商那里获得的IP地址都不是独占的。每次这些用户接入互联网时,互联网服务提供商便给他们提供一个不同的IP地。指定一个域名(URL)给一个随时改变的IP地址就是通常所说的动态域名解析服务。

There are several possibilities to get a dynamic DNS. You need to set up and account with a dynamic DNS provider, and then make the dynamic DNS provider aware of your ip address by using a dynamic DNS client.

您有很多种方法可以获得动态域名解析服务。当然了 您首先需要设定并注册一个动态域名解析服务提供商,然后使用一个动态域名服务客户端来告诉动态域名服务提供商您的ip地址。

Dynamic DNS is usually free but you do not have a large choice of domain names unless you use a paid service.

动态域名解析服务一般都是免费,但是选择余地很小,除非你使用的是付费服务。

Requirements(需求)

To use Dynamic DNS, you need to have an accound at a dynamic DNS provider and to have a dynamic DNS clinet keep tabs on your IP address and inform the provider of any changes.

要使用动态域名解析服务,您需要先从一个动态域名解析服务提供商那里获得一个帐号和一个客户端,以便随时通知动态域名解析服务提供商您的系统发生改变。

If your computer is conected directly to the internet, install a dynamic dns client. If you are conect to the internet through a router, the router itself will usually be able to perform the dynamic DNS client task.

如果你的机器直接连接到互联网,安装一个动态域名解析服务客户端便足以。如果你是通过路由器连接到互联网上面,一般情况下路由器都会提供动态域名解析的服务。

Create an account at one of the following free dynamic DNS providers:

(您可以从下面的免费动态域名解析服务提供商处注册一个帐户)

dyndns.com

no-ip

zoneedit

easy DNS

You will then have your dynamic DNS host name, your user name and your password.

完成注册后您将获得一个动态域名、您的用户名和对应的密码

Install the client software (如何安装客户端程序)

If you are directly connected to your cable or dsl modem, install a dynamic DNS client. If you are connected through a router, skip this step and enter your username, password and host name in the router's dynamic DNS configuration.

如果你的机器是直接连接到电缆或者是dsl调制解调器(即平时所使用的宽带猫)上面话,那么请安装一个动态DNS客户端。如果您是通过路由器连接到互联网的话,那么请跳过这一步,您只需要将您的用户名、密码、域名输入到路由器动态域名解析服务设置中。

Example: 例子1

  • attachment:dyndns.jpg

Another example:例子2

  • attachment:routerdyn.jpg

Enable the Universe repository

Use any method to install the following package:

ddclient

The configuration of that package will ask for your username, password and host name. After which you are done. The ddclient service is started each time you boot.

软件包的配置程序将会询问您的用户名、密码以及域名。一旦配置完成,这个服务将会随着机器的启动而开始运行。

Alternative dynamic DNS clients (替换动态域名服务客户端)

Alternatively, you can install the no-ip package. 作为替换,您可以安装 no-ip软件包。

FIXME 翻译以上部分

Configure the no-ip client (配置no-ip客户端)

sudo no-ip -C

Please enter the login/email string for no-ip.com: set your_login

Please enter the password for user 'your_login' set your password

Please enter an update interval:[30] interval time is in minutes

Do you wish to run something at successful update?[N] (y/N)

请输入no-ip.com上注册过的login/email字符串:设定your_login。 请输入用户“your_login”的密码:来设定您的密码;请输入更新间隔时间:[30],间隔时间单位为分钟;成功更新时您想运行一些程序吗?[N] (y/N)(注:上述翻译不一定和配置no-ip时出现的提示一致)

Start the no-ip client(启动no-ip客户端)

Now no-ip is configured and you can run it with the following command:

现在no-ip已配置妥当,您可以用如下命令运行它了:

sudo no-ip