No-IP

From HotDec

Jump to: navigation, search

The linux client can be obtained here. Install it, then place the following text in the file "/etc/init.d/noip2". Make sure the permissions are set to 755 (chmod 755 noip2). Run "/sbin/chkconfig --add noip2" (as root) to add noip2 to the startup process.

Run "/etc/init.d/noip2 configure" to configure all the interfaces on the machine. The login is "workitharder at gmail dot com" and has the usual password. Configuration files are stored in /usr/local/etc/.

/etc/init.d/noip2:

 #!/bin/sh
#
# chkconfig: 2345 59 41
# description: Starts noip2 for all configured netowork devices.

. /etc/rc.d/init.d/functions

case "$1" in
    start)
	for x in `echo /usr/local/etc/*.noip.conf | sed "s/[^ ]*\/\([^\/\.]*\)\.[^ ]*/\1/g"`; do
		action $"Starting noip2 for $x." /usr/local/bin/noip2 -M -c /usr/local/etc/$x.noip.conf
	done
    ;;
    stop)
	action $"Shutting down noip2." killall noip2
    ;;
    restart)
	$0 stop
	$0 start
    ;;
    configure)
	interfaces="`cat /proc/net/dev | grep -v "lo\|sit0\||" | sed -e "s/ *//" -e "s/:.*//"`"
	for x in $interfaces; do
		echo ">>>>> Configuring interface '$x' <<<<<"
		/usr/local/bin/noip2 -C -I $x -c /usr/local/etc/$x
		echo
	done
	echo "Please restart noip2 for changes to take effect"
    ;;
    *)
	echo "Usage: $0 {start|stop}"
	exit 1
esac
exit 0

Personal tools