I have built a Linux pc now to run oscam but cannot work out how to get noip2 to autostart on boot.
can someone help with the script please for Ubuntu, I cant see a tutorial
how to autostart noip
- anniman
- Thread is marked as Resolved.
-
-
Hi,
Try here:QuoteAt the end of the page
QuoteRead the README file in the no-ip-2.1.9 folder for instructions on how to make the client run at startup. This varies depending on what Linux distribution you are running.
-
nope looks like gibberish to me. I tried to run the grep command but its not recognised and I don't know which is the startup directory
-
Sorry, thats as far as i went with it as i have a static ip and only run windows duc once a month to keep account active.
Fount this on net though,QuoteDisplay MoreNow we will write a simple start up script so the client will start when the computer starts.
sudo nano /etc/init.d/noip
Copy and paste all the following lines (between the long ##### lines) into the file you have just started. (If you are using putty from within windows you can use ctrl-c to copy then in the putty terminal either right cick or use shift-ins to paste
#######################################################
#! /bin/sh
case "$1" in
start)
echo "Starting noip2"
/usr/local/bin/noip2
;;
stop)
echo -n "Shutting down noip2"
for i in `noip2 -S 2>&1 | grep Process | awk '{print $2}' | tr -d ','`
do
noip2 -K $i
done
;;
*)
echo "Usage: $0 {start|stop}"
exit 1
esac
exit 0
#######################################################Now exit and save. ctrl-x to exit and y to save.
You should be able to test the startup scripts with
sudo /etc/init.d/noip stop
sudo /etc/init.d/noip startNow we reset the persmissions so only the root user (ie the system itself) will run the programs from within the start up procedure
sudo chmod 700 /usr/local/bin/noip2
sudo chown root:root /usr/local/bin/noip2
sudo chmod 700 /etc/init.d/noip
sudo chown root:root /etc/init.d/noip
sudo chmod 700 /usr/local/etc/no-ip2.conf
sudo chown root:root /usr/local/etc/no-ip2.confNow we will add the the noip start script to the ubuntu startup process
sudo nano /etc/rc.local
In the line above "exit 0" add the following line
/etc/init.d/noip start
In order for the client to work you will need to open port 8245 through to the server. The way you do this depends on your modem/router. This is called port forwarding. If you need help with port forwarding go to: www.portforward.com
Finally after all this your servers should be available from everywhere at
http://<your_noip_user_name>.no-ip.bizObviously in addition tot he no-ip client port 8245 you will also need to open up ports for the services you are trying to run on your home server. Port 80 for a web server for example
If you had installed the Ubuntu LAMP server as described in the link I gave at the top you can check if its working by going to your site and you should see the ubuntu apache default web page saying something like "Its working"
Please note that since No-IP is a free service they will prune unused ip addresses every thirty days. You will be warned of this at the email address you gave and you can log back into No-IP to keep the address live. As per the No-IP website "Free hostnames must be updated every 30 days in order to keep them active. We do this to keep our network clear of unused hostnames. We send frequent notifications via email to remind you to update your hostname, or you can manually update your hostname by logging in to your No-IP account and clicking the “Hosts/Redirects” tab, click “Modify” next to the hostname you would like to update and click “Update” at the bottom right."
From:
Quotew*w.howtoforge.com/how-to-install-no-ip2-on-ubuntu-12.04-lts-in-order-to-host-servers-on-a-dynamic-ip-address
Hope it helps -
In order for the client to work you will need to open port 8245 through to the server..
hi why does the above port need to be opened,
-
Quote
hi why does the above port need to be opened,
I think it has to be opened if you want to view your server from outside LAN through your no-ip dns.
Quoteyour servers should be available from everywhere at
http://<your_noip_user_name>.no-ip.biz -
i had installed updater following another thread in tutorials section, but there is also this one
http://linuxsat-support.com/showthread.php?t=4843
the other thread didnt have this detail,
gave it a go to see if it works,quote
"You can now simply run noip2 as root and, as a daemon, it will update the server. With option -S all currently running daemons will be listed. To kill one of the daemons use the -K option.To run the daemon automatically when the machine is booted place the following script into /etc/init.d/noip2:
type
sudo nano /etc/init.d/noip2 and copy and paste the below, then press ctrl + x to save it
#! /bin/sh
# /etc/init.d/noip2# Supplied by no-ip.com
# Modified for Debian GNU/Linux by Eivind L. Rygge <eivind@rygge.org># . /etc/rc.d/init.d/functions # uncomment/modify for your killproc
DAEMON=/usr/local/bin/noip2
NAME=noip2test -x $DAEMON || exit 0
case "$1" in
start)
echo -n "Starting dynamic address update: "
start-stop-daemon --start --pidfile /var/run/noip2.pid \
--make-pidfile --exec $DAEMON
echo "noip2."
;;
stop)
echo -n "Shutting down dynamic address update:"
start-stop-daemon --stop --pidfile /var/run/noip2.pid \
--oknodo --retry 30 --exec $DAEMON
echo "noip2."
;;restart)
echo -n "Restarting dynamic address update: "
start-stop-daemon --stop --pidfile /var/run/noip2.pid \
--oknodo --retry 30 --exec $DAEMON
start-stop-daemon --start --pidfile /var/run/noip2.pid \
--exec $DAEMON
echo "noip2."
;;*)
echo "Usage: $0 {start|stop|restart}"
exit 1
esac
exit 0Make sure it is executable:
# chmod 0755 /etc/init.d/noip2
Also make sure you give the daemon root privelages by:
# chown root:root /usr/local/bin/noip2
Now if you have done everything correctly as root user just type :
noip2
that will start the process
& to see if its running as root type noip2 -S
-
just tried both methods and still no luck. I bought a new router a netgear DGN220v4 and it doesn't even have it as an option in the dns even after a firmware upgrade
-
Now we will write a simple start up script so the client will start when the computer starts.
sudo nano /etc/init.d/noip
Copy and paste all the following lines (between the long ##### lines) into the file you have just started. (If you are using putty from within windows you can use ctrl-c to copy then in the putty terminal either right cick or use shift-ins to paste
################################################## #####
#! /bin/sh
case "$1" in
start)
echo "Starting noip2"
/usr/local/bin/noip2
;;
stop)
echo -n "Shutting down noip2"
for i in `noip2 -S 2>&1 | grep Process | awk '{print $2}' | tr -d ','`
do
noip2 -K $i
done
;;
*)
echo "Usage: $0 {start|stop}"
exit 1
esac
exit 0
################################################## #####Now exit and save. ctrl-x to exit and y to save.
You should be able to test the startup scripts with
sudo /etc/init.d/noip stop
sudo /etc/init.d/noip startNow we reset the persmissions so only the root user (ie the system itself) will run the programs from within the start up procedure
sudo chmod 700 /usr/local/bin/noip2
sudo chown root:root /usr/local/bin/noip2
sudo chmod 700 /etc/init.d/noip
sudo chown root:root /etc/init.d/noip
sudo chmod 700 /usr/local/etc/no-ip2.conf
sudo chown root:root /usr/local/etc/no-ip2.confNow we will add the the noip start script to the ubuntu startup process
sudo nano /etc/rc.local
In the line above "exit 0" add the following line
/etc/init.d/noip start
In order for the client to work you will need to open port 8245 through to the server. The way you do this depends on your modem/router. This is called port forwarding. If you need help with port forwarding go to: www.portforward.com
Finally got it to work with one difference to the above, when we get to the part
Now we will add the the noip start script to the ubuntu startup process
sudo nano /etc/rc.local
In the line above "exit 0" add the following line
/etc/init.d/noip start
it should read /etc/init.d/noip2 start
Your resource for Linux TV servers and smart card readers.
Find software downloads, drivers, and support for server setup and card-sharing configurations. Set up a Linux-based TV server. Access downloads and support for server software and USB card readers for advanced TV reception and management
