.\" Automatically generated by Pod::Man 2.27 (Pod::Simple 3.28) .\" .\" Standard preamble: .\" ======================================================================== .de Sp \" Vertical space (when we can't use .PP) .if t .sp .5v .if n .sp .. .de Vb \" Begin verbatim text .ft CW .nf .ne \\$1 .. .de Ve \" End verbatim text .ft R .fi .. .\" Set up some character translations and predefined strings. \*(-- will .\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left .\" double quote, and \*(R" will give a right double quote. \*(C+ will .\" give a nicer C++. Capital omega is used to do unbreakable dashes and .\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff, .\" nothing in troff, for use with C<>. .tr \(*W- .ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' .ie n \{\ . ds -- \(*W- . ds PI pi . if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch . if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch . ds L" "" . ds R" "" . ds C` "" . ds C' "" 'br\} .el\{\ . ds -- \|\(em\| . ds PI \(*p . ds L" `` . ds R" '' . ds C` . ds C' 'br\} .\" .\" Escape single quotes in literal strings from groff's Unicode transform. .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" .\" If the F register is turned on, we'll generate index entries on stderr for .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index .\" entries marked with X<> in POD. Of course, you'll have to process the .\" output yourself in some meaningful fashion. .\" .\" Avoid warning from groff about undefined register 'F'. .de IX .. .nr rF 0 .if \n(.g .if rF .nr rF 1 .if (\n(rF:(\n(.g==0)) \{ . if \nF \{ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . if !\nF==2 \{ . nr % 0 . nr F 2 . \} . \} .\} .rr rF .\" .\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2). .\" Fear. Run. Save yourself. No user-serviceable parts. . \" fudge factors for nroff and troff .if n \{\ . ds #H 0 . ds #V .8m . ds #F .3m . ds #[ \f1 . ds #] \fP .\} .if t \{\ . ds #H ((1u-(\\\\n(.fu%2u))*.13m) . ds #V .6m . ds #F 0 . ds #[ \& . ds #] \& .\} . \" simple accents for nroff and troff .if n \{\ . ds ' \& . ds ` \& . ds ^ \& . ds , \& . ds ~ ~ . ds / .\} .if t \{\ . ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u" . ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u' . ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u' . ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u' . ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u' . ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u' .\} . \" troff and (daisy-wheel) nroff accents .ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V' .ds 8 \h'\*(#H'\(*b\h'-\*(#H' .ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#] .ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H' .ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u' .ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#] .ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#] .ds ae a\h'-(\w'a'u*4/10)'e .ds Ae A\h'-(\w'A'u*4/10)'E . \" corrections for vroff .if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u' .if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u' . \" for low resolution devices (crt and lpr) .if \n(.H>23 .if \n(.V>19 \ \{\ . ds : e . ds 8 ss . ds o a . ds d- d\h'-1'\(ga . ds D- D\h'-1'\(hy . ds th \o'bp' . ds Th \o'LP' . ds ae ae . ds Ae AE .\} .rm #[ #] #H #V #F C .\" ======================================================================== .\" .IX Title "DYNDNS 1" .TH DYNDNS 1 "2014-07-08" "perl v5.18.2" "Perl Dynamic DNS Update Client" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l .nh .SH "NAME" dyndns \- Update IP address to dynamic DNS (DDNS) provider .SH "SYNOPSIS" .IX Header "SYNOPSIS" .Vb 2 \& dyndns \-\-login LOGIN \-\-password PASSWORD \e \& \-\-host yourhost.dyndns.org .Ve .SH "DESCRIPTION" .IX Header "DESCRIPTION" A cross platform Perl client for updating dynamic \s-1DNS IP\s0 information at supported providers (see \f(CW\*(C`\-\-provider\*(C'\fR). By Default this program expects www.dyndns.org provider. .PP The dynamic \s-1DNS\s0 services allow mapping a dynamic \s-1IP\s0 address to a static hostname. This way the host can be refered by name instead of the changing \s-1IP\s0 address from the \s-1ISP\s0's pool. Some \s-1DDNS\s0 providers offer a single account and a single host namefree of charge. Please check the information from the Providers' pages. .PP Separate files are used for remembering the last \s-1IP\s0 address to prevent updating the same \s-1IP\s0 address again. This is necessary in order to comply guidelines of the providers where multiple updates of the same \s-1IP\s0 address could cause your domain to be blocked. You should not normally need to touch the files where the \s-1IP\s0 addresses are stored. .PP If you know what you are doing and desperately need a forced update, delete the \s-1IP\s0 files and start program with apropriate arguments. Without the information about previous \s-1IP\s0 address, program sends a new update request to the provider. .PP Program has been designed to work under any version of Windows or Linux, possibly Mac \s-1OS\s0 included. It may not work under other Unix/BSD variants. Please see \s-1BUGS\s0 section how to provide details to add support for other operating systems. .PP Visit the page of the provider and create an account. Write down the login name, password and host name you registered. .PP For Windows operating systems, you need to install Perl. There are two Perl incarnatons: Native Windows version (Activestate Perl) and Cygwin version. The \f(CW\*(C`http://www.cygwin.com/\*(C'\fR is recommended as it more closely follows the original Perl environment. .SH "OPTIONS" .IX Header "OPTIONS" .SS "Gneneral options" .IX Subsection "Gneneral options" .IP "\fB\-\-config=FILE [\-\-config=FILE ...]\fR" 4 .IX Item "--config=FILE [--config=FILE ...]" List of configuration files to read. No command line options other than \fB\-\-verbose\fR, \fB\-\-debug\fR or \fB\-\-test\fR should be appended or results are undefined. Each file must contain complete \s-1DDNS\s0 account configuration. .Sp The \s-1FILE\s0 part will go through Perl's \f(CW\*(C`glob()\*(C'\fR function, meaning that the filenames are expanded. Series of configuration files can be run at once e.g. within directory \f(CW\*(C`/etc/dyndns/\*(C'\fR by using a single option. The order of the files processed is alphabetical: .Sp .Vb 1 \& \-\-config=/etc/dyndns/* .Ve .Sp See section \s-1CONFIGURATION FILE\s0 for more information how to write the files. .IP "\fB\-\-host=host1 [\-\-host=host2 ...]\fR" 4 .IX Item "--host=host1 [--host=host2 ...]" Use registered \s-1HOST\s0(s). .IP "\fB\-\-group \s-1GROUP\s0\fR" 4 .IX Item "--group GROUP" \&\fBThis option is only for \-\-provider noip\fR .Sp Assign \s-1IP\s0 to \s-1GROUP.\s0 Do you have many hosts that all update to the same \&\s-1IP\s0 address? Update a group instead of a many hosts. .IP "\fB\-\-login \s-1LOGIN\s0\fR" 4 .IX Item "--login LOGIN" \&\s-1DDNS\s0 account's \s-1LOGIN\s0 name. .IP "\fB\-\-mxhost MX-HOST-NAME\fR" 4 .IX Item "--mxhost MX-HOST-NAME" \&\fBThis option is only for \-\-provider dyndns\fR .Sp Update account information with \s-1MX\s0 hostname. Specifies a Mail eXchanger for use with the host being modified. Must resolve to an \fBstatic\fR \s-1IP\s0 address, or it will be ignored. If you don't know \s-1DNS,\s0 don't touch this option. .Sp The servers you list need to be correctly configured to accept mail for your hostname, or this will do no good. Setting up a server as an \s-1MX\s0 without permission of the administrator may get them angry at you. If someone is contacted about such an infraction, your \s-1MX\s0 record will be removed and possibly further action taken to prevent it from happening again. Any mail sent to a misconfigured server listed as an \s-1MX\s0 may bounce, and may be lost. .IP "\fB\-\-mx\-option\fR" 4 .IX Item "--mx-option" \&\fBThis option is only for \-\-provider dyndns\fR .Sp Turn on \s-1MX\s0 option. Request that the \s-1MX\s0 in the previous parameter be set up as a backup. This means that mail will first attempt to deliver to your host directly, and will be delivered to the \s-1MX\s0 listed as a backup. .Sp Note regarding provider \f(CW\*(C`noip\*(C'\fR: .Sp Update clients cannot change this value. Clients can only submit requests to the php script to update the A record. Changes such as \s-1MX\s0 records must be done through website. .IP "\fB\-\-offline\fR" 4 .IX Item "--offline" If given, set the host to offline mode. .Sp \&\f(CW\*(C`Note:\*(C'\fR [dyndns] This feature is only available to donators. The \&\*(L"!donator\*(R" return message will appear if this is set on a non-donator host. .Sp This is useful if you will be going offline for an extended period of time. If someone else gets your old \s-1IP\s0 your users will not go to your old \s-1IP\s0 address. .IP "\fB\-\-password \s-1PASSWORD\s0\fR" 4 .IX Item "--password PASSWORD" \&\s-1DDNS\s0 account's \s-1PASSWORD.\s0 .IP "\fB\-\-system {dyndns|statdns|custom}\fR" 4 .IX Item "--system {dyndns|statdns|custom}" \&\fBThis option is only for \-\-provider dyndns\fR .Sp The system you wish to use for this update. \f(CW\*(C`dyndns\*(C'\fR will update a dynamic host, \f(CW\*(C`custom\*(C'\fR will update a MyDynDNS Custom \s-1DNS\s0 host and \f(CW\*(C`statdns\*(C'\fR will update a static host. The default value is \f(CW\*(C`dyndns\*(C'\fR and you cannot use other options (statdns|custom) unless you donate and gain access to the more advanced features. .Sp See the \s-1DDNS\s0 provider's pages for more information. .IP "\fB\-\-wildcard\fR" 4 .IX Item "--wildcard" Turn on wildcard option. The wildcard aliases \f(CW\*(C`*.yourhost.ourdomain.ext\*(C'\fR to the same address as \f(CW\*(C`yourhost.ourdomain.ext\*(C'\fR .SS "Additional options" .IX Subsection "Additional options" .IP "\fB\-D, \-\-daemon [\s-1WAIT\-MINUTES\s0]\fR" 4 .IX Item "-D, --daemon [WAIT-MINUTES]" Enter daemon mode. The term \*(L"daemon\*(R" refers to a standalone processes which keep serving until killed. In daemon mode program enters into infinite loop where \s-1IP\s0 address changes are checked periodically. For each new ip address check, program waits for WAIT-MINUTES. Messages in this mode are reported using \fIsyslog\fR\|(3); if available. .Sp This option is designed to be used in systems that do not provide Unix-like cron capabilities (e.g under Windows \s-1OS\s0). It is better to use \fIcron\fR\|(8) and define an entry using \fIcrontab\fR\|(5) notation to run the update in periodic intervals. This will use less memory when Perl is not permanently kept in memory like it would with option \fB\-\-daemon\fR. .Sp The update to \s-1DDNS\s0 provider happens only if .Sp .Vb 3 \& 1) IP address changes \& 2) or it has taken 30 days since last update. \& (See DDNS providers\*(Aq account expiration time documentation) .Ve .Sp The minimum sleep time is 5 minutes. Program will not allow faster wake up times(*). The value can be expressed in formats: .Sp .Vb 4 \& 15 Plain number, minutes \& 15m (m)inutes. Same sa above \& 1h (h)ours \& 1d (d)days .Ve .Sp This options is primarily for permanent Internet connection. If you have a dial-up connection, it is better to arrange the \s-1IP\s0 update at the same time as when the connection is started. In Linux this would happen during \f(CWifup(1)\fR. .Sp (*) Perl language is \s-1CPU\s0 intensive so any faster check would put considerable strain on system resources. Normally a value of 30 or 60 minutes will work fine in most cases. Monitor the \s-1ISP\s0's \s-1IP\s0 rotation time to adjust the time in to use sufficiently long wake up times. .IP "\fB\-\-ethernet [\s-1CARD\s0]\fR" 4 .IX Item "--ethernet [CARD]" In Linux system, the automatic \s-1IP\s0 detection uses program \&\f(CWifconfig(1)\fR. If you have multiple network cards, select the correct card with this option. The default device used for query is \f(CW\*(C`eth0\*(C'\fR. .IP "\fB\-\-file \s-1PREFIX\s0\fR" 4 .IX Item "--file PREFIX" Prefix where to save \s-1IP\s0 information. This can be a) a absolute path name to a file b) directory where to save or c) directory + prefix where to save. Make sure that files in this location do not get deleted. If they are deleted and you happen to update \s-1SAME\s0 ip twice within a short period \- according to www.dyndns.org \s-1FAQ \-\s0 your address may be blocked. .Sp On Windows platform all filenames must use forward slashs like \&\f(CW\*(C`C:/somedir/to/\*(C'\fR, not \f(CW\*(C`C:\esomedir\eto\e\*(C'\fR. .Sp The \s-1PREFIX\s0 is only used as a basename for supported \s-1DDNS\s0 accounts (see \&\fB\-\-provider\fR). The saved filename is constructed like this: .Sp .Vb 3 \& PREFIX\-\-\-.log \& | \& See option \-\-system .Ve .Sp A sample filename in Linux could be something like this if \s-1PREFIX\s0 were set to \f(CW\*(C`/var/log/dyndns/\*(C'\fR: .Sp .Vb 1 \& /var/log/dyndns/eth0\-statdns\-my.dyndns.org\-dyndns.log .Ve .IP "\fB\-f, \-\-file\-default\fR" 4 .IX Item "-f, --file-default" Use reasonable default for saved \s-1IP\s0 file \s-1PREFIX \s0(see \fB\-\-file\fR). Under Windows, \f(CW%WINDIR\fR% is used. Under Linux the PREFIXes searched are .Sp .Vb 3 \& /var/log/dyndns/ (if directory exists) \& /var/log/ (system\*(Aqs standard) \& $HOME/tmp or $HOME If process is not running under root .Ve .Sp This options is by default activated if \fB\-\-file\fR is not in use. .IP "\fB\-\-proxy \s-1HOST\s0\fR" 4 .IX Item "--proxy HOST" Use \s-1HOST\s0 as outgoing \s-1HTTP\s0 proxy. .IP "\fB\-P, \-\-provider \s-1TYPE\s0\fR" 4 .IX Item "-P, --provider TYPE" By default, program connects to \f(CW\*(C`dyndns.org\*(C'\fR to update the dynamic \s-1IP\s0 address. There are many free dynamic \s-1DNS\s0 providers are reported. Supported list of \s-1TYPES\s0 in alphabetical order: .Sp .Vb 3 \& hnorg No domain name limists \& Basic DDNS service is free (as of 2003\-10\-02) \& http://hn.org/ \& \& dyndns No domain name limits. \& Basic DDNS service is free (as of 2003\-10\-02) \& http://www.dyndns.org/ \& See also http://members.dyndns.org/ \& \& noip No domain name limits. \& Basic DDNS service is free (as of 2003\-10\-02) \& http://www.no\-ip.com/ .Ve .Sp \&\s-1NOTE:\s0 as of 2010, the support for sites of hnorg, noip is probably non-working due to changes in the interfaces. Please use only dyndns at this time. .IP "\fB\-\-query\fR" 4 .IX Item "--query" Query current \s-1IP\s0 address and quit. \fBNote:\fR if you use router, you may need \fB\-\-urlping*\fR options, otherwise the \s-1IP\s0 address returned is your subnet's \s-1DHCP IP\s0 and not the \s-1ISP\s0's Internet \s-1IP.\s0 .Sp Output of the command is at least two string. The second string is \&\f(CW\*(C`last\-ip\-info\-not\-available\*(C'\fR if the saved ip file name is not specified. In order to program to know where to look for saved \s-1IP\s0 files you need to give some \fB\-\-file*\fR or \fB\-\-config\fR option. The second string can also be \&\f(CW\*(C`nochange\*(C'\fR if current \s-1IP\s0 address is same as what was found from saved file. Examples: .Sp .Vb 5 \& 100.197.1.6 last\-ip\-info\-not\-available \& 100.197.1.6 100.197.1.7 \& 100.197.1.6 nochange 18 \& | \& How many days since last saved IP .Ve .Sp \&\fBNote for tool developers:\fR additional information may be provided in future. Don't rely on the count of the output words, but instead parse output from left to right. .IP "\fB\-\-query\-ipchanged ['exitcode']\fR" 4 .IX Item "--query-ipchanged ['exitcode']" Print message if \s-1IP\s0 has changed or not. This option can take an optional string argument \f(CW\*(C`exitcode\*(C'\fR which causes program to indicate changed ip address with standard shell status code (in bash shell that would available at variable \f(CW$?\fR): .Sp .Vb 3 \& $ dyndns \-\-query\-ipchange exitcode \-\-file\-default \e \& \-\-provider dyndns \-\-host xxx.dyndns.org \& $ echo $? \& \& ... the status code of shell ($?) would be: \& \& 0 true value, changed \& 1 false value, error code, i.e. not changed .Ve .Sp Without the \f(CW\*(C`exitcode\*(C'\fR argument, the returned strings are: .Sp .Vb 7 \& Current IP address \& | \& changed 35 111.222.333.444 \& nochange 18 \& | \& Days since last IP update. Based on saved IP file\*(Aqs \& time stamp. .Ve .Sp If the last saved \s-1IP\s0 file's time stamp is too old, then even if the \s-1IP\s0 were not really changed, the situation is reported with word \f(CW\*(C`changed\*(C'\fR. This is due to time limits the \s-1DDNS\s0 providers have. The account would expire unless it is updated in \s-1NN\s0 days. .Sp \&\fBNote for tool developers:\fR additional information may be provided in future. Don't rely on the count of the output words, but instead parse output from left to right. .IP "\fB\-\-query\-ipfile\fR" 4 .IX Item "--query-ipfile" Print the name of the \s-1IP\s0 file and quit. .Sp \&\fBNote:\fR In order for this option to work, you must supply all other options would be normally pass to update the \s-1DDNS\s0 account, because the Ip filename depends on these options. Alternatively provide option \fB\-\-config \&\s-1FILE\s0\fR from where all relevant information if read. .Sp .Vb 4 \& \-\-ethernet [optional, defaults to eth0] \& \-\-provider [optional, defaults to dyndns] \& \-\-system [optional, defaults to dyndns] \& \-\-host required. .Ve .Sp Here is an example which supposed that directory \f(CW\*(C`/var/log/dyndns/\*(C'\fR already exists: .Sp .Vb 3 \& $ dyndns \-\-file\-default \-\-query\-ipfile \e \& \-\-provider dyndns \-\-host xxx.dyndns.org \& /var/log/dyndns/eth0\-dyndns\-dyndns\-xxx\-dyndns.org.log .Ve .IP "\fB\-\-regexp \s-1REGEXP\s0\fR" 4 .IX Item "--regexp REGEXP" In host, which has multiple netword cards, the response can include multiple \s-1IP\s0 addresses. The default is to pick always the first choice, but that may not be what is wanted. The regexp \s-1MUST\s0 not contain capturing parentheses: if you need one, use non-capturing choice (?:). Refer to Perl manual page \f(CW\*(C`perlre\*(C'\fR for more information about non-cpaturing regular expression parentheses. .Sp Here is an example from Windows: .Sp .Vb 1 \& Ethernet adapter {3C317757\-AEE8\-4DA7\-9B68\-C67B4D344103}: \& \& Connection\-specific DNS Suffix . : \& Autoconfiguration IP Address. . . : 169.254.241.150 \& Subnet Mask . . . . . . . . . . . : 255.255.0.0 \& Default Gateway . . . . . . . . . : \& \& Ethernet adapter Local Area Connection 3: \& \& Connection\-specific DNS Suffix . : somewhere.net \& IP Address. . . . . . . . . . . . : 193.10.221.45 \& Subnet Mask . . . . . . . . . . . : 255.255.0.0 \& Default Gateway . . . . . . . . . : 10.10.0.101 .Ve .Sp The 193.10.221.45 is the intended dynamic \s-1IP\s0 address, not the first one. To instruct searching from somewhere else in the listing, supply a regular expressions that can match a portion in the listing after which the \s-1IP\s0 address appears. In the above case, the regexp could be: .Sp .Vb 1 \& \-\-regexp "Connection 3:" .Ve .Sp In Windows, the words that follow \*(L"\s-1IP\s0 Address\*(R" are automatically expected, so you should not add them to the regexp. .Sp In FreeBSD 4.5, you may get following response: .Sp .Vb 7 \& tun0: flags mtu 1492 \& inet6 fe80::250:4ff:feef:7998%tun0 prefixlen 64 scopeid 0x7 \& inet 62.214.33.49 \-\-> 255.255.255.255 netmask 0xffffffff \& inet 62.214.32.12 \-\-> 255.255.255.255 netmask 0xffffffff \& inet 62.214.35.49 \-\-> 255.255.255.255 netmask 0xffffffff \& inet 62.214.33.163 \-\-> 62.214.32.1 netmask 0xff000000 \& Opened by PID 64 .Ve .Sp The correct \s-1IP\s0 address to pick from the listing is the one, which does not contain netmask 0xffffffff. The picked address for above is therefore 62.214.33.163. The regexp that finds that line is: .Sp .Vb 4 \& \-\-regexp ".*0xffffffff.*?inet" \& | | \& | Search minimum match until word "inet" \& search maximum match .Ve .Sp This will match all the way until the the last line with netmask 0xffffffff, after which shortest match \f(CW\*(C`.*?\*(C'\fR to \f(CW\*(C`inet\*(C'\fR is reached to read the number following it. The regexp must make sure that the next word after its match point is the wanted address. .SS "Cable, \s-1DSL\s0 and router options" .IX Subsection "Cable, DSL and router options" If you do not have direct access to world known \f(CW\*(C`real\*(C'\fR \s-1IP\s0 address, but to a subnet \s-1IP\s0 address, then you cannot determine your outside world \s-1IP\s0 address from your machine directly. See picture below: .PP .Vb 7 \& router/subnet Internet \& +\-\-\-\-\-\-\-\-\-\-\-\-\-+ +\-\-\-\-\-\-\-\-\-\-\-+ \& Your PC: | | maps address | | \& connect to ISP \-\-> | ROUTER | \-\-\-\-\-\-\-\-\-\-\-\-\-> | | \& | 192.168.... | | 80.1.1.1 | \& local ip says: +\-\-\-\-\-\-\-\-\-\-\-\-\-+ +\-\-\-\-\-\-\-\-\-\-\-+ \& 192.168.xxx.xxx THE REAL IP .Ve .PP \&\s-1ASDL\s0 and cable modem and other connections may not be directly connected to Internet, but to a router to allow subnnetting internal hosts. This makes several computers to access the Internet while the \s-1ISP\s0 has offered only one visible \s-1IP\s0 address to you. The router makes the mapping of the local subnet \&\s-1IP\s0 to the world known \s-1IP\s0 address, provided by the \s-1ISP\s0 when the connection was established. .PP You need some way to find out what is the real \s-1IP\s0 is. The simplest way is to connect to a some web page, which runs a reverse lookup service which can show the connecting \s-1IP\s0 address. .PP Note: the following web web page does not exists. To find a service that is able to display your \s-1IP\s0 address, do a google search. Let's say, that you found a fictional service \&\f(CW\*(C`http://www.example.com/showip\*(C'\fR and somewhere in the web page it reads: .PP .Vb 1 \& Your IP address is: 212.111.11.10 .Ve .PP This is what you need. To automate the lookup from web page, you need to instruct the program to connect to \s-1URL\s0 page and tell how to read the ip from page by using a regular expression. Consult Perl's manual page \f(CW\*(C`perlre\*(C'\fR if you are unfamiliar with the regular expressions. For the above fictional service, the options needed would be: .PP .Vb 8 \& \-\-urlping "http://showip.org/?showit.pl" \& \-\-urlping\-regexp "address is:\es+([\ed.]+)" \& | || \& | |+\- Read all digits and periods \& | | \& | +\- capturing parentheses \& | \& +\- expect any number of whitespaces .Ve .PP \&\s-1NOTE:\s0 The text to match from web page is not text/plain, but text/html, so you must look at the \s-1HTML\s0 page's sources to match the \s-1IP\s0 address correctly without the bold tags etc. .IP "\fB\-\-urlping \s-1URL\s0\fR" 4 .IX Item "--urlping URL" Web page where world known \s-1IP\s0 address can be read. If you find a Web server that is running some program, which can show your \s-1IP\s0 addres, use it. The example below connects to site and calls \s-1CGI\s0 program to make show the connector's \s-1IP\s0 address. Be polite. Making calls like this too often may cause putting blocks to your site. .Sp .Vb 1 \& http://www.dyndns.org/cgi\-bin/check_ip.cgi .Ve .Sp Be sure to use period of 60 minutes or more with \fB\-\-daemon\fR option to not increase the load in the \*(L"ping\*(R" site and cause admin's to shut down the service. .IP "\fB\-\-urlping\-dyndns\fR" 4 .IX Item "--urlping-dyndns" Contact http://www.dyndns.org service to obtain \s-1IP\s0 address information. This is shorthand to more general optiopn \fB\-\-urlping\fR. .IP "\fB\-\-urlping\-linksys [\s-1TYPE\s0]\fR" 4 .IX Item "--urlping-linksys [TYPE]" \&\fBSpecialized router option for Linksys products\fR. .Sp This option connects to Linksys Wireless \s-1LAN\s0 4\-point router, whose page is by default at local network address \-. The world known \s-1IP\s0 address (which is provided by \s-1ISP\s0) is parsed from that page. The product is typically connected to the cable or \s-1DSL\s0 modem. Refer to routing picture presented previously. .Sp If the default login and password has been changed, options \&\fB\-\-urlping\-login\fR and \fB\-\-urlping\-password\fR must be supplied .Sp For \s-1TYPE\s0 information, See . Products codes currently supported include: .Sp .Vb 4 \& \- BEFW11S4, Wireless Access Point Router with 4\-Port Switch. \& Page: http://192.168.1.1/Status.htm \& \- WRT54GL, Wireless WRT54GL Wireless\-G Broadband Router. \& Page: http://192.168.1.1/Status_Router.asp .Ve .IP "\fB\-\-urlping\-login \s-1LOGIN\s0\fR" 4 .IX Item "--urlping-login LOGIN" If \f(CW\*(C`\-\-urlping\*(C'\fR web page requires authentication, supply user name for a secured web page. .IP "\fB\-\-urlping\-password \s-1LOGIN\s0\fR" 4 .IX Item "--urlping-password LOGIN" If \f(CW\*(C`\-\-urlping\*(C'\fR web page requires authentication, supply password for a secured web page. .IP "\fB\-\-urlping\-regexp \s-1REGEXP\s0\fR" 4 .IX Item "--urlping-regexp REGEXP" After connecting to page with \fB\-\-urlping \s-1URL\s0\fR, the web page is examined for \&\s-1REGEXP.\s0 The regexp must catch the \s-1IP\s0 to perl match \f(CW$1\fR. Use non-capturing parenthesis to control the match as needed. For example this is incorrect: .Sp .Vb 3 \& \-\-urlping\-regexp "(Address|addr:)\es+([0\-9.]+)" \& | | \& $1 $2 .Ve .Sp The match \s-1MUST\s0 be in \*(L"$1\*(R", so you must use non-capturing perl paentheses for the first one: .Sp .Vb 3 \& \-\-urlping\-regexp "(?:Address|addr:) +([0\-9.]+)" \& | | \& non\-capturing $1 .Ve .Sp If this option is not given, the default value is to find first word that matches: .Sp .Vb 1 \& ([0\-9]+\e.[0\-9]+\e.[0\-9]+\e.[0\-9]+) .Ve .SS "Miscellaneous options" .IX Subsection "Miscellaneous options" .IP "\fB\-\-debug [\s-1LEVEL\s0]\fR" 4 .IX Item "--debug [LEVEL]" Turn on debug with optional positive \s-1LEVEL.\s0 Use this if you want to know details how the program initiates connection or if you experience trouble contacting \s-1DDNS\s0 provider. .IP "\fB\-\-help\fR" 4 .IX Item "--help" Print help .IP "\fB\-\-help\-html\fR" 4 .IX Item "--help-html" Print help in \s-1HTML\s0 format. .IP "\fB\-\-help\-man\fR" 4 .IX Item "--help-man" Print help page in Unix manual page format. You want to feed this output to \&\fBnroff \-man\fR in order to read it. .IP "\fB\-\-test [\s-1LEVEL\s0]\fR" 4 .IX Item "--test [LEVEL]" Run in test mode, do not actually update anything. \s-1LEVEL 1\s0 allows sending \s-1HTTP\s0 ping options and getting answers. .IP "\fB\-\-test\-driver\fR" 4 .IX Item "--test-driver" This is for developer only. Run internal integrity tests. .IP "\fB\-\-test\-account\fR" 4 .IX Item "--test-account" This is for developer only. Uses \s-1DYNDNS\s0 test account options. All command line values that set host information or provider are ignored. Refer to client page at http://clients.dyndns.org/devel .IP "\fB\-\-verbose\fR" 4 .IX Item "--verbose" Print informational messages. .IP "\fB\-\-version\fR" 4 .IX Item "--version" Print version and contact information. .SH "EXAMPLES" .IX Header "EXAMPLES" To update \s-1IP\s0 address periodically, use \fIcrontab\fR\|(5) entry. The update will happen only if \s-1IP\s0 has changed since last time: .PP .Vb 1 \& 0 0\-23 * * * perl /dyndns .Ve .PP To check current \s-1IP\s0 address: .PP .Vb 3 \& dyndns \-\-query [\-\-urlping...] \& | \& Select correct option to do the "ping" for IP .Ve .PP Show where the ip file is/would be stored with given connect options. The option \fB\-\-file\-default\fR uses \s-1OS\s0's default directory structure. .PP .Vb 2 \& dyndns \-\-file\-default \-\-query\-ipfile \-\-provider dyndns \e \& \-\-host xxx.dyndns.org .Ve .PP To upate account information to \s-1DDNS\s0 provider: .PP .Vb 1 \& dyndns \-\-provider dyndns \-\-login \-\-password \-\-host your.dyndns.org .Ve .PP If your router can display a web page containing the world known \s-1IP\s0 address, you can instruct to \*(L"ping\*(R" it. Suppose that router is at address 192.168.1.1 and page that displays the world known \s-1IP\s0 is \&\f(CW\*(C`status.html\*(C'\fR, and you have to log in to the router using username \&\f(CW\*(C`foo\*(C'\fR and password \f(CW\*(C`bar\*(C'\fR: .PP .Vb 3 \& dyndns \-\-urlping http://192.168.1.1/Status.html \e \& \-\-urlping\-login foo \e \& \-\-urlping\-pass bar \e .Ve .PP If the default regexp does not find \s-1IP\s0 address from the page, supply your own match with option \fB\-\-urlping\-regexp\fR. In case of doubt, add option \fB\-\-debug 1\fR and examine the responses. In serious doubt, contact the maintainer (see option \fB\-\-version\fR) and send the full debug output. .PP Tip: if you run a local web server, provider \f(CW\*(C`www.dyndns.org\*(C'\fR can direct calls to it. See option \f(CW\*(C`\-\-wildcard\*(C'\fR to enable `*.your.dyndns.org' domain delegation, like if it we accessed using `www.your.dyndns.org'. .SH "CONFIGURATION FILE" .IX Header "CONFIGURATION FILE" Instead of supplying options at command line, they can be stored to a configuration file. For each \s-1DDNS\s0 account and different domains, a separate configuration file must be created. The configuration files are read with option \fB\-\-config\fR. .PP The syntax of the configuration file includes comments that start with (#). Anything after hash-sign is interpreted as comment. Values are set in \s-1KEY\s0 = \&\s-1VALUE\s0 fashion, where spaces are non-significant. Keys are not case sensitive, but values are. .PP Below, lines marked with [default] need only be set if the default value needs to be changed. Lines marked with [noip] or [dyndns] apply to only those providers' \s-1DDNS\s0 accounts. Notice that some keys, like \f(CW\*(C`host\*(C'\fR, can take multple values seprated by colons. On/Off options take values [1/0] respectively. All host name values below are fictional. .PP .Vb 1 \& # /etc/dyndns/dyndns.conf \& \& # Set to "yes" to make this configuration file excluded \& # from updates. \& \& disable = no # [default] \& \& ethernet = eth0 # [default] \& group = mygourp # Provider [noip] only. \& host = host1.dyndns.org, host1.dyndns.org \& \& # If you route mail. See dyndns.org documentation for details \& # how to set up MX records. If you know nothing about DNS/BIND \& # Don\*(Aqt even consider using this option. Misuse or broken \& # DNS at your end will probably terminate your \*(Aqfree\*(Aq dyndns contract. \& \& mxhost = mxhost.dyndns.org \& \& # Details how to get the world known IP address, in case the standard \& # Linux \*(Aqifconfig\*(Aq or Windows \*(Aqipconfig\*(Aq programs cannot be used. This \& # interests mainly Cable, DSL and router owners. NOTE: You may \& # not use all these options. E.g. [urlping\-linksys4] is alternate \& # to [urlping] etc. See documentation. \& \& urlping\-linksys = BEFW11S4 \& urlping\-login = joe \& urlping\-password = mypass \& \& urlping = fictional.showip.org \& urlping\-regexp = (?:Address|addr:)\es+([0\-9.]+) \& \& # Where IPs are stored. Directory name or Directory name with \& # additional file prefix. The directory part must exist. You could \& # say \*(Aqfile = /var/log/dyndns/\*(Aq but that\*(Aqs the default. \& \& file = default # Use OS\*(Aqs default location \& \& # The DDNS account details \& \& login = mylogin \& password = mypass \& provider = dyndns # [default] \& proxy = myproxy.myisp.net # set only if needed for HTTP calls \& \& # Hou need this option only if you have multiple ethernet cards. \& # After which regexp the IP number appers in ifconfig(1) listing? \& \& regexp = .*0xffffffff.*?inet \& \& # What account are you using? Select \*(Aqdyndns|statdns|custom\*(Aq \& \& system = dyndns # Provider [dyndns] only \& \& # Yes, delegate all *.mydomain.dyndns.org calls \& \& wildcard = 1 \& \& # End of cnfiguration file .Ve .PP See the details of all of these options from the corresponding command line option descriptions. E.g. option 'ethernet' in configuration file corresponds to \fB\-\-ethernet\fR command line option. The normal configuration file for average user would only include few lines: .PP .Vb 1 \& # /etc/dyndns/myhost.dyndns.org.conf \& \& host = myhost.dyndns.org \& file = default # Use OS\*(Aqs default location \& login = mylogin \& password = mypassword \& provider = dyndns \& system = dyndns # or \*(Aqstatdns\*(Aq \& wildcard = 1 # Delegate *.mydomain.dyndns.org \& \& # End of cnfiguration file .Ve .PP \&\s-1TODO \s0(write Debian daemon scripts) \s-1FIXME:\s0 .PP .Vb 1 \& update\-rc.d dyndns start 3 4 5 6 # Debian .Ve .SH "SUPPORT REQUESTS" .IX Header "SUPPORT REQUESTS" For new Operating System, provide all relevant commands, their options, examples and their output which answer to following questions. The items in parentheses are examples from Linux: .PP .Vb 7 \& \- How is the OS detected? Send result of \*(Aqid \-a\*(Aq, or if file/dir \& structure can be used to detect the system. In Lunux the \& existence of /boot/vmlinuz could indicate that "this is a Linux \& OS". \& \- What is the command to get network information (commandlike \*(Aqifconfig\*(Aq) \& \- Where are the system configuration files stored (in directory /etc?) \& \- Where are the log files stored (under /var/log?) .Ve .PP To add support for routers that can be connected through \s-1HTTP\s0 protocol or with some other commands, please provide connection details and full \s-1HTTP\s0 response: .PP .Vb 1 \& wget \-O \-dump.html http://192.168.1.0/your\-network/router/page.html .Ve .SH "TROUBLESHOOTING" .IX Header "TROUBLESHOOTING" 1. Turn on \fB\-\-debug\fR to see exact details how the program runs and what \s-1HTTP\s0 requests are sent and received. .PP 2. Most of the <\-\-query> options can't be used standalone. Please see documentation what additional options you need to supply with them. .SH "ENVIRONMENT" .IX Header "ENVIRONMENT" .IP "\fB\s-1TMPDIR\s0\fR" 4 .IX Item "TMPDIR" Directory of temporary files. Defaults to system temporary dir. .SH "FILES" .IX Header "FILES" Daemon startup file .PP .Vb 1 \& /etc/default/dyndns .Ve .PP In Linux the syslog message files are: .PP .Vb 2 \& /etc/syslog.conf daemon.err daemon.warning \& /var/log/daemon.log .Ve .PP There is no default location where program would search for configuration files. Configuration files may be found in directory \&\f(CW\*(C`/etc/dyndns/examples\*(C'\fR. It is recommended that the examples are modified and copied one directorory up in order to use option \&\fB\-\-config /etc/dyndns/*\fR. .PP If program is run with Windows Activestate Perl, the log file is stored to file \f(CW\*(C`C:/syslog.txt\*(C'\fR. .SH "EXIT STATUS" .IX Header "EXIT STATUS" Not defined. .SH "DEPENDENCIES" .IX Header "DEPENDENCIES" Uses standard Perl modules. .PP HTTP::Headers HTTP::Request::Common LWP::UserAgent LWP::Simple Sys::Syslog .SH "STANDARDS" .IX Header "STANDARDS" The \fIdyndns\fR provider's client specification is at https://www.dyndns.com/developers/specs/ .SH "BUGS AND LIMITATIONS" .IX Header "BUGS AND LIMITATIONS" .SS "Cygwin syslog" .IX Subsection "Cygwin syslog" There is no syslog daemon in Cygwin. The Cygwin \s-1POSIX\s0 emulation layer takes care about syslog requests. On \s-1NT\s0 and above systems it logs to the Windows's event manager, on Win9x and \s-1ME\s0 a file is created in the root of drive \f(CW\*(C`C:\*(C'\fR. See message for more details. .PP You can see the entries in W2K Start => Settings => Administrative Tools => Computer Management: [ System Tools / Event Viewer / Application ] .SS "Debugging errors" .IX Subsection "Debugging errors" Please use option \fB\-\-debug 2\fR and save the result. Contact maintainer if you find bugs or need new features. .SS "About providers hnorg and noip" .IX Subsection "About providers hnorg and noip" The program is primarily developed and maintained to support dyndns.org. The other providers haven't been tested since 2003. .SH "SEE ALSO" .IX Header "SEE ALSO" \&\fIsyslog\fR\|(3), Debian package \fIddclient\fR\|(1) .PP See other client software at http://clients.dyndns.org .SH "AVAILABILITY" .IX Header "AVAILABILITY" http://freecode.com/projects/perl\-dyndns .SH "AUTHOR" .IX Header "AUTHOR" This program is free software; you can redistribute and/or modify program under the terms of \s-1GNU\s0 General Public license either version 2 of the License, or (at your option) any later version. .PP The documentation may be distributed subject to the terms and conditions set forth in \s-1GNU\s0 General Public License v2 or later (\s-1GNU GPL\s0); or, at your option, distributed under the terms of \s-1GNU\s0 Free Documentation License version 1.2 or later (\s-1GNU FDL\s0).