Some weeks ago, I asked if anyone had set up a backup scheme for a remote server. By backup here, I mean an alternative arrangement that can be called upon if eg the DSL connection to the remote machine fails. I received one interesting reply: =====================At home, besides my fixed lines, I have two gsm-modems, one low-speed (that came free of charge with one of my fixed lines), the other is high speed, but pre-paid, normally off) =====================I meant to respond at the time, asking for further details, but forgot, and now I have lost the original message. So now I am posting again, asking if anyone has implemented any such arrangement. If you have, I would be very interested to hear the details. In my case, I spend time in two countries - Ireland and Italy - and have servers in each place. The problem in both places is that the ADSL modem sometimes goes off, and the only way to turn it back on seems to be to disconnect and re-connect the power supply. -- Timothy Murphy e-mail: gayleard /at/ eircom.net tel: +353-86-2336090, +353-1-2842366 School of Mathematics, Trinity College, Dublin 2, Ireland
Have you trying with a power supply over lan? (I don't know how is named in english, but maybe this can help you; http://http://www.google.com/images?client=ms-rim&hl=es&q=zapatilla+ip&oe=UTF-8&channel=browser&sa=X&oi=image_result_group&ei=4A4OUqS6EIioyAHAn4Aw&ved=0CAcQsAQ ) Then some kind of magic ( :p ) with a bash script to reboot the adsl modem Diego Sanchez Sent from my mobile -----Original Message----- From: Timothy Murphy <gayleard at alice.it> Sender: centos-bounces at centos.org Date: Fri, 16 Aug 2013 13:33:01 To: <centos at centos.org> Reply-To: CentOS mailing list <centos at centos.org> Subject: [CentOS] Back-up connection Some weeks ago, I asked if anyone had set up a backup scheme for a remote server. By backup here, I mean an alternative arrangement that can be called upon if eg the DSL connection to the remote machine fails. I received one interesting reply: =====================At home, besides my fixed lines, I have two gsm-modems, one low-speed (that came free of charge with one of my fixed lines), the other is high speed, but pre-paid, normally off) =====================I meant to respond at the time, asking for further details, but forgot, and now I have lost the original message. So now I am posting again, asking if anyone has implemented any such arrangement. If you have, I would be very interested to hear the details. In my case, I spend time in two countries - Ireland and Italy - and have servers in each place. The problem in both places is that the ADSL modem sometimes goes off, and the only way to turn it back on seems to be to disconnect and re-connect the power supply. -- Timothy Murphy e-mail: gayleard /at/ eircom.net tel: +353-86-2336090, +353-1-2842366 School of Mathematics, Trinity College, Dublin 2, Ireland _______________________________________________ CentOS mailing list CentOS at centos.org http://lists.centos.org/mailman/listinfo/centos
On Fri, Aug 16, 2013 at 01:33:01PM +0200, Timothy Murphy wrote:> Some weeks ago, I asked if anyone had set up a backup scheme for a remote > server. > By backup here, I mean an alternative arrangement that can be called upon > if eg the DSL connection to the remote machine fails. > > I received one interesting reply: > =====================> At home, besides my fixed lines, > I have two gsm-modems, one low-speed (that came free of charge with one of > my fixed lines), > the other is high speed, but pre-paid, normally off) > =====================> I meant to respond at the time, asking for further details, > but forgot, and now I have lost the original message.I think that the original thread was on users at lists.fedoraproject.org: http://www.spinics.net/linux/fedora/fedora-users/msg435811.html In case the web/CLI interface of DSL modem/router is still responsive, you can script a reboot from the server on the LAN when fails the ping to a set of well-know always-up hosts. I resuscitate this way a D-Link DSL-320B with (snippet): # Set both international and national hosts. hosts="www.google.com www.yahoo.com www.libero.it www.telecom.it" for h in $hosts; do ping -c 2 "$h" > /dev/null 2>&1 && { # Success retval=0 break } echo "Ping failed for ${h}." retval=1 # Failure done test "$retval" -ne 0 && { echo -e "\nResetting the ADSL modem." phantomjs adsl-reboot.js } adsl-reboot.js is a Javascript script that logins onto the modem and "clicks" the reset button. You can also play with the -w option if your ping supports it. The default timeout is 10 seconds or so. Mihai
Timothy Murphy wrote:> The problem in both places is that the ADSL modem sometimes goes off, > and the only way to turn it back on seems to be > to disconnect and re-connect the power supply.I had a similar problem with a cable modem. My relatively inexpensive solution was to buy an X-10 Firecracker kit and build bottlerocket from http://www.linuxha.com/bottlerocket/. I then set up a cron job to test the Internet connection every minute and reset the power whenever it failed. c
On 8/16/2013 4:33 AM, Timothy Murphy wrote:> Some weeks ago, I asked if anyone had set up a backup scheme for a remote > server. > By backup here, I mean an alternative arrangement that can be called upon > if eg the DSL connection to the remote machine fails.Not sure if this is what you are thinking about but I had similar problem back in the day with a router that the only was I could get it back online was to power cycle it. Picked up one these on Ebay for like $30.00 http://www.baytech.net/products/showprod.php?prod=ds2-rpc Was really handy, still have it just in case.
On 08/16/2013 01:33 PM, Timothy Murphy wrote:> Some weeks ago, I asked if anyone had set up a backup scheme for a remote > server. > By backup here, I mean an alternative arrangement that can be called upon > if eg the DSL connection to the remote machine fails. > > I received one interesting reply: > =====================> At home, besides my fixed lines, > I have two gsm-modems, one low-speed (that came free of charge with one of > my fixed lines), > the other is high speed, but pre-paid, normally off) > =====================> I meant to respond at the time, asking for further details, > but forgot, and now I have lost the original message. > > So now I am posting again, asking if anyone has implemented any such > arrangement. > If you have, I would be very interested to hear the details. > > In my case, I spend time in two countries - Ireland and Italy - > and have servers in each place. > The problem in both places is that the ADSL modem sometimes goes off, > and the only way to turn it back on seems to be > to disconnect and re-connect the power supply. > >I do not know how to find what I am looking for on net, so I will just try to explain how to reset your ADSL or other device via phone. You can build a device that will use either power from phone/mobile speaker to charge capacitor that will in turn disconnect the power to any kind of device (power cord). Idea is to dial that phones number and keep it ringing for a certain period of time. Impulses from the speaker (constant (polyphonic) melody) will keep charged a "electronic item/coil?" that will brake the power circuit/cable of your device. I usually kept it ringing for 10 seconds and after I stop calling, coil? will loose charge and return to the original position again closing the circuit and allowing to device to power up. I am no engineer and my technical English is horrible, but I think any decent electrician/TV repairman should understand what I am talking about. It's cheap and dirty manual trick, but when push comes to shove you can dial that phone and reboot the ADSL modem in no time. -- Ljubomir Ljubojevic (Love is in the Air) PL Computers Serbia, Europe StarOS, Mikrotik and CentOS/RHEL/Linux consultant
For remote power management (including when I'm on-site and want to do it from my desk instead of the server room), I use PDUs (power distribution units) like <http://www.apc.com/products/resource/include/techspec_index.cfm?base_sku=AP7900> (which is also an excellent fencing device if you're doing clustering). They may be expensive for a hobbiest, but for a business using tested commercially available hardware configurations should be a no-brainer. If you have an OOB (out-of-band) way of getting to that network, just make sure that the PDU is reachable via OOB. Now a days I tend to use a connection via an alternate provider (so if you're using ADSL, maybe there's a cable provider in the area as well). If you want to go old school, you can hook a modem directly to the AP79xx serial control port, however if you're going to deploy a modem I'd suggest hooking it up to an internal server and then ssh/telnet to the PDU from that server; that way the modem is able to help you in other network-not-available cases. If an OOB connection is not feasible, then your only other option is what others described: Write a script to check connectivity to upstream services (I'd use at least three instead of just one), and trigger the PDU reset if they fail. Perl and various CPAN modules make this easy (although doing it this way would be my last choice compared to an OOB connection). Devin -- Yield to temptation; it may not pass your way again. - Robert Heinlein