Part of Slepp's ProjectsPastebinTURLImagebinFilebin
Feedback -- English French German Japanese
Create Upload Newest Tools Donate

Advertising

Someone
Wednesday, February 27th, 2008 at 4:32:03pm UTC 

  1. This file describes noip2, a second-generation Linux client for the
  2. no-ip.com dynamic DNS service.
  3.  
  4. NEW:    This code will build and run on Solaris/Intel and BSD also.
  5.         Edit the Makefile for Solaris and the various BSDs.
  6.         For BSD users wanting to use a tun interface, see below.
  7.         Let me know about any other changes needed for noip2 to
  8.         operate correctly on your non-Linux OS.
  9.         Mac OS X is a BSD variant.
  10.  
  11. Please read this short file before using noip2.
  12.  
  13. ###########################################################################
  14. HOW TO BUILD AN EXECUTABLE FOR YOUR SYSTEM
  15.  
  16. The command
  17.         make
  18. will build a binary of the noip2 client that will run on your system.
  19.  
  20. If you do not have 'make' installed and you have an i686 Linux machine
  21. with libc6, a binary for i686 systems is located in the binaries
  22. directory called noip2-Linux. Copy that binary to the build directory
  23.   'cp binaries/noip2-Linux noip2'
  24.  
  25. The command
  26.         make install
  27. (which must be run as root) will install the various pieces to their
  28. appropriate places.  This will ask questions and build a configuration
  29. data file. 
  30. See below if you can't become root or can't write in /usr/local/*.
  31.  
  32. ###########################################################################
  33. HOW TO USE THE CLIENT WITHOUT READING THE REST OF THIS TEXT
  34.  
  35. Usual operation?
  36. /usr/local/bin/noip2 -C   configure a client
  37. /usr/local/bin/noip2            run a client
  38. /usr/local/bin/noip2 -S   display info about running clients
  39. /usr/local/bin/noip2 -D pid          toggle the debug state for client pid
  40. /usr/local/bin/noip2 -K pid          terminate client pid
  41.  
  42. Have more than one internet access device?
  43. /usr/local/bin/noip2 -M -c file  start additional instances
  44.  
  45. ###########################################################################
  46. HOW TO START THE CLIENT
  47.  
  48. The noip2 executable can be run by typing /usr/local/bin/noip2
  49.  
  50. If you want it to run automatically when the machine is booted, then
  51. place the following script in your startup directory. (/etc/init.d/rcX.d
  52. or /sbin/init.d/rcX.d or ???)
  53.  
  54.         #######################################################
  55.         #! /bin/sh
  56.         # . /etc/rc.d/init.d/functions  # uncomment/modify for your killproc
  57.         case "$1" in
  58.             start)
  59.                 echo "Starting noip2."
  60.                 /usr/local/bin/noip2
  61.             ;;
  62.             stop)
  63.                 echo -n "Shutting down noip2."
  64.                 killproc -TERM /usr/local/bin/noip2
  65.             ;;
  66.             *)
  67.                 echo "Usage: $0 {start|stop}"
  68.                 exit 1
  69.         esac
  70.         exit 0
  71.         #######################################################
  72.  
  73. Where the 'X' in rcX.d is the value obtained by running the
  74. following command
  75.         grep initdefault /etc/inittab | awk -F: '{print $2}'
  76.  
  77. Killproc can be downloaded from ftp://ftp.suse.com/pub/projects/init
  78. Alternatively, you can uncomment the line after #! /bin/sh
  79.  
  80. If you have a recent RedHat version, you may want to use the startup script
  81. supplied by another user.  It's in this package called redhat.noip.sh
  82. It may need some modification for your system.
  83.  
  84. There is a startup script for Debian called debian.noip2.sh.
  85. It also has been supplied by another user and is rumored to fail in some
  86. situations.
  87.  
  88. Another user has supplied a proceedure to follow for MAc OS X auto startup.
  89. It's called mac.osx.startup.  Mac users may wish to read that file.
  90.  
  91. Here is a script which will kill all running copies of noip2.
  92.   #!/bin/sh
  93.   for i in `noip2 -S 2>&1 | grep Process | awk '{print $2}' | tr -d ','`
  94.   do
  95.     noip2 -K $i
  96.   done
  97. These four lines can replace 'killproc' and 'stop_daemon' in the other scripts.
  98.  
  99. If you are behind a firewall, you will need to allow port 8245 (TCP) through
  100. in both directions.
  101. #######################################################################
  102.  
  103. IMPORTANT!!  Please set the permissions correctly on your executable.
  104. If you start noip2 using one of the above methods, do the following:
  105. chmod 700 /usr/local/bin/noip2
  106. chown root:root /usr/local/bin/noip2
  107. If you start noip2 manually from a non-root account, do the chmod 700 as
  108. above but chown the executable to the owner:group of the non-root account, and
  109. you will need to substitute your new path if the executable is not in
  110. /usr/local/bin.
  111.  
  112. ###########################################################################
  113. SAVED STATE
  114.  
  115. Noip2 will save the last IP address that was set at no-ip.com when it ends. 
  116. This setting will be read back in the next time noip2 is started. The
  117. configuration data file must be writable for this to happen!  Nothing
  118. happens if it isn't, the starting 0.0.0.0 address is left unchanged.
  119. If noip2 is started as root it will change to user 'nobody', group
  120. 'nobody'.  Therefore the file must be writeable by user 'nobody' or
  121. group 'nobody' in this case!
  122.  
  123. ###########################################################################
  124. BSD USING A TUN DEVICE
  125.  
  126. Recent BSD systems will use getifaddrs() to list ALL interfaces.  Set the
  127. 'bsd_wth_getifaddrs' define in the Makefile if using a version of BSD
  128. which supports getifaddrs() and ignore the rest of this paragraph.
  129. Mac OS X users should have a versdion of BSD which supports getifaddrs().
  130. Otherwise set the 'bsd' define.
  131. The 'bsd' setting will not list the tun devices in BSD.  Therefore a tun
  132. device cannot be selected from the menu.  If you want to use a tun device
  133. you will need to edit the Makefile and change the line
  134.         ${BINDIR}/${TGT} -C -Y -c /tmp/no-ip2.conf
  135. to
  136.         ${BINDIR}/${TGT} -C -Y -c /tmp/no-ip2.conf -I 'your tun device'
  137.  
  138. ###########################################################################
  139. COMMAND LINE ARGUMENTS WHEN INVOKING THE CLIENT
  140.  
  141. The client will put itself in the background and run as a daemon.  This
  142. means if you invoke it multiple times, and supply the multiple-use flag,
  143. you will have multiple instances running.
  144.  
  145. If you want the client to run once and exit, supply the '-i IPaddress'
  146. argument.  The client will behave well if left active all the time even on
  147. intermittent dialup connections; it uses very few resources.
  148.  
  149. The actions of the client are controlled by a configuration data file.  It is
  150. usually located in /usr/local/etc/no-ip2.conf, but may be placed anywhere if
  151. the '-c new_location' parameter is passed on the startup line.
  152.  
  153. The configuration data file can be generated with the '-C' parameter.
  154.  
  155. There are some new command line arguments dealing with default values in the
  156. configuration data file.  They are  -F, -Y and -U.
  157.  
  158. The interval between successive testing for a changed IP address is controlled
  159. the '-U nn' parameter.  The number is minutes, a minimum of 1 is enforced
  160. by the client when running on the firewall machine, 5 when running behind
  161. a router/firewall.  A usual value for clients behind a firewall is 30.
  162. One day is 1440, one week is 10080, one month is 40320, 41760, 43200 or 44640.
  163. One hour is left as an exercise for the reader :-)
  164.  
  165. The configuration builder code will allow selection among the hosts/groups
  166. registered at no-ip.com for the selected user.  The '-Y' parameter will
  167. cause all the hosts/groups to be selected for update.
  168.  
  169. Some sites have multiple connections to the internet.  These sites confuse
  170. the auto NAT detection.  The '-F' parameter will force the non-NAT
  171. or "firewall" setting.
  172.  
  173. The client can be invoked with the '-i IPaddress' parameter which will force
  174. the setting of that address at no-ip.com.  The client will run once and exit.
  175.  
  176. The -I parameter can be used to override the device name in the configuration
  177. data file or to force the supplied name into the configuration data file while
  178. it is being created.  Please use this as a last resort!
  179.  
  180. The '-S' parameter is used to display the data associated with any running
  181. copies of noip2.  If nothing is running, it will display the
  182. contents of the configuration data file that is selected. It will then exit.
  183.  
  184. The '-K process_ID' parameter is used to terminate a running copy of noip2.
  185. The process_ID value can be obtained by running noip2 -S.
  186.  
  187. The '-M' parameter will permit multiple running copies of the noip2 client.
  188. Each must have it's own configuration file.  Up to 4 copies may run
  189. simultaneously.
  190.  
  191. All errors and informational messages are stored via the syslog facility.
  192. A line indicating a successful address change at no-ip.com is always
  193. written to the syslog. The syslog is usually /var/log/messages.
  194.  
  195. If the client has been built with debugging enabled, the usual state, the '-d'
  196. parameter will activate the debug output.  This will produce a trace of the
  197. running program and should help if you are having problems getting the
  198. connection to no-ip.com established.  All errors, messages and I/O in both
  199. directions will be displayed on the stderr instead of syslog.
  200. The additional '-D pid' parameter will toggle the debug state of a running
  201. noip2 process.  This will not change where the output of the process is
  202. appearing; if it was going to the syslog, it will still be going to the syslog.
  203.  
  204. One final invocation parameter is '-h'.  This displays the help screen as
  205. shown below and ends.                     
  206.  
  207. USAGE: noip2 [ -C [ -F][ -Y][ -U #min]][ -c file]
  208.         [ -d][ -D pid][ -i addr][ -S][ -M][ -h]
  209.  
  210. Version Linux-2.x.x
  211. Options: -C               create configuration data
  212.          -F               force NAT off
  213.          -Y               select all hosts/groups
  214.          -U minutes       set update interval
  215.          -c config_file   use alternate data path
  216.          -d               increase debug verbosity
  217.          -D processID     toggle debug flag for PID
  218.          -i IPaddress     use supplied address
  219.          -I interface     use supplied interface
  220.          -S               show configuration data
  221.          -M               permit multiple instances
  222.          -K processID     terminate instance PID
  223.          -h               help (this text)
  224.  
  225. ###########################################################################
  226. HOW TO CONFIGURE THE CLIENT
  227.  
  228. The command
  229.         noip2 -C
  230. will create configuration data in the /usr/local/etc directory.
  231. It will be stored in a file called no-ip2.conf.
  232.  
  233. If you can't write in /usr/local/*, or are unable to become root on
  234. the machine on which you wish to run noip2, you will need to include
  235. the '-c config_file_name' on every invocation of the client, including
  236. the creation of the datafile.  Also, you will probably need to put the
  237. executable somewhere you can write to.  Change the PREFIX= line in the
  238. Makefile to your new path and re-run make install to avoid these problems.
  239.  
  240. You will need to re-create the datafile whenever your account or password
  241. changes or when you add or delete hosts and/or groups at www.no-ip.com
  242. Each invocation of noip2 with '-C' will destroy the previous datafile.
  243.  
  244. Other options that can be used here include '-F' '-Y' -U'
  245.  
  246. You will be asked if you want to run a program/script upon successful update
  247. at no-ip.com.  If you specify a script, it should start with #!/bin/sh or
  248. your shell of choice.  If it doesn't, you will get the 'Exec format error'
  249. error.  The IP address that has just been set successfully will be delivered
  250. as the first argument to the script/program.  The host/group name will be
  251. delivered as the second argument.
  252.  
  253. Some machines have multiple network connections.  In this case, you will be
  254. prompted to select the device which connects to outside world. The -I flag
  255. can be supplied to select an interface which is not shown.  Typically, this
  256. would be one of the pppx interfaces which do not exist until they are active.
  257.  
  258. The code will prompt for the username/email used as an account identifier
  259. at no-ip.com.  It will also prompt for the password for that account.
  260.  
  261. The configuration data contains no user-serviceable parts!!
  262.  
  263. IMPORTANT!!  Please set the permissions correctly on the configuration data.
  264. chmod 600 /usr/local/etc/no-ip2.conf.
  265. chown root:root /usr/local/etc/no-ip2.conf.
  266. If you start noip2 manually from a non-root account, do the chmod as
  267. above but chown the no-ip2.conf file to the owner:group of the non-root
  268. account.  Make sure the directory is readable!
  269.  
  270. The program will drop root privileges after acquiring the configuration data
  271. file.
  272. ###########################################################################
  273.  
  274. I would like to see this README.FIRST text translated to other languages. 
  275. If you can convert this file from English to another language, please send
  276. the translated file to me.  Thank you.
  277.  
  278. ###########################################################################
  279.  
  280. Bugs should be reported to [email protected]
  281.  
  282. Email me if you need help, but be aware I have extensive spam filtering.
  283. If your mailserver is blocked, send your message thru no-ip support.
  284. Don't send mail in html; no one will see it. 
  285.  
  286. You can make a trace file and examine it for error messages. 
  287. Here's how to do that.   
  288. Type:    script noip2.out
  289. Type:    'your noip command line with the -d parameter added'
  290. Type:    exit
  291. Examine the file noip2.out.  Send it to me if you're still puzzled.
  292.  
  293.         [email protected]  January 2004

advertising

Update the Post

Either update this post and resubmit it with changes, or make a new post.

You may also comment on this post.

update paste below
details of the post (optional)

Note: Only the paste content is required, though the following information can be useful to others.

Save name / title?

(space separated, optional)



Please note that information posted here will not expire by default. If you do not want it to expire, please set the expiry time above. If it is set to expire, web search engines will not be allowed to index it prior to it expiring. Items that are not marked to expire will be indexable by search engines. Be careful with your passwords. All illegal activities will be reported and any information will be handed over to the authorities, so be good.

comments powered by Disqus
worth-right