Headless and offline!

If none of the more specific forums is the right place to ask

Headless and offline!

Postby Clivetimmins » 2017-10-18 00:05

Hi i am running debian 9 on a headless machine. It has a static IP never have any issues with that. Rebooting router causes no issues. But my isp have gone down twice in the last month when the internet comes back on. All my devices work except my server that stays offline. Tried rebooting router to see if that was the problem. The only fix is to reboot the server. Can't connect with it in anyway when it's offline so can't check anything
Clivetimmins
 
Posts: 7
Joined: 2017-07-24 01:06

Re: Headless and offline!

Postby makh » 2017-10-18 03:54

Clivetimmins wrote:But my isp have gone down twice in the last month when the internet comes back on. All my devices work except my server that stays offline.

I previously installed a program ifplugd. It may hep you.
HP Probook 440 G2: Arch, Debian Stable
Server: none
Past: Debian, Centos, Ubuntu, Opensuse
GUI: Openbox, Cinnamon
Chroot: Debian, Ubuntu
VM: Devuan

Employing the best:
Arabic
Debian
Homeopathic

For new: Try Linux Mint
User avatar
makh
 
Posts: 543
Joined: 2011-10-09 09:16

Re: Headless and offline!

Postby TonyT » 2017-10-18 11:29

If the Internet goes down then the LAN connection is likely still alive. On the headless computer install openssh-server and on another comp install openssh-client. (check names of these packages) Then when the server loses its Internet connection and comes back on, and/or after rebooting the router, open a terminal and ssh into the server
ssh <username>@xxx.xxx.xxx.xxx
and restart networking using the command:
/etc/init.d/networking restart
or
service networking restart

May need to be root or sudo.
TonyT
 
Posts: 525
Joined: 2006-09-04 11:57

Re: Headless and offline!

Postby makh » 2017-10-18 11:38

TonyT wrote:...

If this helps, you may put network restart command in cronjob, at intervals required.
HP Probook 440 G2: Arch, Debian Stable
Server: none
Past: Debian, Centos, Ubuntu, Opensuse
GUI: Openbox, Cinnamon
Chroot: Debian, Ubuntu
VM: Devuan

Employing the best:
Arabic
Debian
Homeopathic

For new: Try Linux Mint
User avatar
makh
 
Posts: 543
Joined: 2011-10-09 09:16

Re: Headless and offline!

Postby pylkko » 2017-10-18 12:13

Also consider a script which pings a server on the internet and if no response then tries to reset.
User avatar
pylkko
 
Posts: 1177
Joined: 2014-11-06 19:02

Re: Headless and offline!

Postby Clivetimmins » 2017-10-18 23:49

Ifplugd seems like a good idea. Hopefully it will work even if the cable isn't physically removed. Will try that and simulate a internet failure. The LAN disconnects as well as WAN. Can't ssh to it even locally, in the router setup it won't even show a connection after the failure. (The newest superhub from VM) it's mostly a cloud server with file sizes of up to 35Gb I wouldn't want a cron job resetting the adapter halfway into a 3 hour transfer. I like the ping idea. I could ping my 2 offsite servers. And OR the result to make sure it's down and not the other site down lol.

Thank you all for your replies they are appreciated. It seemed impossible to google that wuestion
Clivetimmins
 
Posts: 7
Joined: 2017-07-24 01:06

Re: Headless and offline!

Postby TonyT » 2017-10-19 12:10

The LAN disconnects as well as WAN.

No router I have ever used or setup for clients does that. The LAN should remain ON even if the WAN connection goes OFF. Hunt around the router settings to see if can change that behavior, else get a better router. If stuck using an ISP provided router, such as FIOS router-modems, you can put the ISP device in bridge mode and use your own better router. It's also possible that the existing router has gone bad, the LAN should always remain ON unless the power goes out.
TonyT
 
Posts: 525
Joined: 2006-09-04 11:57

Re: Headless and offline!

Postby Clivetimmins » 2017-10-19 21:15

I have a few always online devices that have no problems with this. It's only a problem with the debian machine. So must be a link there. It is currently in DMZ maybe that causes a issue?. Adding a second router that can handle my 350mps connection would a expensive fix Tbh. Thank you for your repplies :D
Clivetimmins
 
Posts: 7
Joined: 2017-07-24 01:06

Re: Headless and offline!

Postby TonyT » 2017-10-20 12:09

Take it out of the dmz and test it by killing the wan connection.
TonyT
 
Posts: 525
Joined: 2006-09-04 11:57


Return to General Questions

Who is online

Users browsing this forum: No registered users and 2 guests

fashionable