个人工具

“UbuntuHelp:DynamicDNS”的版本间的差异

来自Ubuntu中文

跳转至: 导航, 搜索
第23行: 第23行:
 
However, even if your modem/router does support dynamic DNS reporting, there are cases where you will need to use the second approach: perhaps you modem/router is too old, or perhaps you want the DNS entry to follow your *computer* around, rather than stay with your DSL/Cable connection.
 
However, even if your modem/router does support dynamic DNS reporting, there are cases where you will need to use the second approach: perhaps you modem/router is too old, or perhaps you want the DNS entry to follow your *computer* around, rather than stay with your DSL/Cable connection.
 
== Using your Computer to perform Dynamic DNS Notification ==
 
== Using your Computer to perform Dynamic DNS Notification ==
There are several alternatives. You may need to add the Ubuntu Universe to your set of software repositories. See InstallingSoftware for all the details.
+
There are several alternatives. You may need to add the Ubuntu Universe to your set of software repositories. See [[UbuntuHelp:InstallingSoftware|InstallingSoftware]] for all the details.
 
=== inadyn ===
 
=== inadyn ===
 
Install the <code><nowiki>inadyn</nowiki></code> package using Synaptic Package manager, then:
 
Install the <code><nowiki>inadyn</nowiki></code> package using Synaptic Package manager, then:
第81行: 第81行:
 
Here are some example screenshots from Wireless Routers that support dynamic DNS reporting:
 
Here are some example screenshots from Wireless Routers that support dynamic DNS reporting:
 
Example:
 
Example:
https://help.ubuntu.com/community/DynamicDNS?action=AttachFile&do=get&target=dyndns.jpg
+
https://help.ubuntu.com/community/[[UbuntuHelp:[[UbuntuHelp:DynamicDNS|DynamicDNS]]?|DynamicDNS]]??action=AttachFile&do=get&target=dyndns.jpg
 
Another example:
 
Another example:
 
https://help.ubuntu.com/community/DynamicDNS?action=AttachFile&do=get&target=routerdyn.jpg
 
https://help.ubuntu.com/community/DynamicDNS?action=AttachFile&do=get&target=routerdyn.jpg

2007年12月4日 (二) 10:25的版本

Parent page: Internet and Networking

Dynamic DNS

Every computer which is attached to the internet has an IP address. DNS is the process of relating a name to an IP address so that a website or other service can be accessed using an easily-remembered named (like 'www.google.com'), rather than a number (like '192.168.0.1'). Most servers on the internet have a fixed IP address that never changes. This means that a 'static' DNS record can be set once such that it always redirects the DNS name to right place. However, most home users will be assigned a dynamic IP address that will change periodically, or each time they connect to the internet. In the past this made it very difficult to make a home computer accessible from the broader Internet. But with an increasing number of "Dynamic DNS" service providers, this is not such a problem. Dynamic DNS services offer you a DNS entry with a hostname of your choice. You are then responsible for updating the DNS entry whenver your IP address changes. This pages gives details about how to do that.

Registering with a Dynamic DNS provider

Dynamic DNS requires that a server somewhere on the internet keep track of 'where you are'. That is, it records your host name, and records what the IP address is that corresponds to your hostname. Many Dynamic DNS provider offer a free service with a limited range of hostnames to choose from. Paid services will permit a larger selection of hostnames, including use of your own registered domain name. So before you can get started using Dynamic DNS, you'll need to register with one of these such services. Here is a selection:

Upon registering, you will be provided with username and password, as well a hostname that you will be using as the DNS name that will allow external access to your machine.

Set up DNS Notification

Now that you have a DNS provider, you need to set up a way that your IP address will be updated whenever it is changed. There are two ways of doing this:

  • using the built-in capabilities of your Cable/DSL modem or Router
  • using dynamic DNS software that you install on your computer

Try first to find out if your modem/router supports Dynamic DNS reporting/notification/updating. If your modem has a built-in 'website' you may find the necessary information by entering its IP address into your browser, for example http://10.1.1.1/ or http://192.168.01/ However, even if your modem/router does support dynamic DNS reporting, there are cases where you will need to use the second approach: perhaps you modem/router is too old, or perhaps you want the DNS entry to follow your *computer* around, rather than stay with your DSL/Cable connection.

Using your Computer to perform Dynamic DNS Notification

There are several alternatives. You may need to add the Ubuntu Universe to your set of software repositories. See InstallingSoftware for all the details.

inadyn

Install the inadyn package using Synaptic Package manager, then: The following will allow your Ubuntu Linux machine to be accessible anywhere that you are given an externally-accessible IP address. This includes most ISPs but excludes many office LANs. First edit the file /etc/inadyn.conf:

gksudo gedit /etc/inadyn.conf

It should contain something like to the following:

--username myusername
--password mypassword
--update_period 60000
--alias myhost.dyndns.org
--background

Now test that it works by typing

sudo /usr/sbin/inadyn

Next, add inadyn to your 'crontab':

export EDITOR=gedit
sudo crontab -e

Edit the file to add the following additional line:

@reboot /usr/sbin/inadyn

Then save and exit the editor. Verify using

sudo crontab -l

When you reboot, you should see indyn listed when you type

ps -A | grep inadyn

You should be able to log in to your Dynamic DNS provider's website and verify that the DNS entry is being updated. Certainly this is possible with www.dyndns.org, in any case. Alternatively you can type your hostname into a service like http://www.dnsstuff.com/.

ddclient

More details required here. The documentation is good however, and there is a Ubuntu package for ddclient in the Ubuntu Universe. Install ddclient and the package installer scripts will ask you for your information. http://ddclient.sourceforge.net/?page=0

no-ip

This is another Dynamic DNS reporting client.

sudo no-ip -C
Please enter the login/email string for no-ip.com: <your_login>
Please enter the password for user 'your_login': <your_password>
Please enter an update interval:[30] <interval time in minutes>
Do you wish to run something at successful update?[N] <N>

Next, start the no-ip client

sudo no-ip

Using your Modem/Router for Dynamic DNS Reporting

Here are some example screenshots from Wireless Routers that support dynamic DNS reporting: Example: https://help.ubuntu.com/community/[[UbuntuHelp:DynamicDNS?|DynamicDNS]]??action=AttachFile&do=get&target=dyndns.jpg Another example: DynamicDNS?action=AttachFile&do=get&target=routerdyn.jpg