Koozali.org formerly Contribs.org

Dansguardinan and restarting network

Dansguardinan and restarting network
« on: January 14, 2013, 10:05:01 PM »
I'm having a number of problems that I'm going to have to work through.

The first one is that the network seems to be going down every week.

We use the SME in server gateway mode.  It is version 7.6.  This computer is in a remote location in the woods. We have one ranger in the winter that uses it as the gateway to the internet from the residence. In the summer it’s used by other staff. Every Saturday/Sunday night he says he can’t surf the web e.g. goes down. When he reboots the SME it starts up again. Last Sunday it seemed to go off line at 4:29am. I calculate this based on Logme in saying that the Server has been off for 4:hrs 31min at 9am Sunday.

I think the problem is the update of the Dansguardian.
I have cron job script that DL new DG Blacklists every week at about 4:22am.  Part of the process restarts the nics.

As I recall some time ago when I first installed OS  I Was coming in on Mondays and was disconnected from network.  I think at the time I fixed it by putting at the end of the DG Download script the following.

service network restart

This seemed to fix it. Well it doesn’t seem to work now.

When I run this command remotely it disconnects from the network but does not start up eth1 any more.  It takes down both but only brings up eth0, which is the internal network.
When I ask the employee to run  “service network restart” it does not bring up eth1

I tried to run # “ifconfig eth1 up” But this didn’t seem to bring up that card. It seems that the command that I have used don’t seems to work? Can anyone suggest a network command that will restart the network. Or of course any other solutions. Perhaps there is an error I should see in on of the log files as to what is happening, why the network is not restarting? I see some things in the message log but Im not sure which is pertinent.

thanks.

Offline _alex

  • ***
  • 103
Re: Dansguardinan and restarting network
« Reply #1 on: January 14, 2013, 10:11:42 PM »
IIRC:
Code: [Select]
service wan [re]start

Re: Dansguardinan and restarting network
« Reply #2 on: January 15, 2013, 05:28:12 PM »
Unfortunetely that did not start up the eth1.
However what did work was
Code: [Select]
/etc/rc7.d/S*wan restartI discovered this buy applying what "charlie brady" is quoted as saying  on this web site ..
http://www.sme-server.de/doku/Server-FAQs/TroubleshootingFAQ.html#servicecmd
 
Quote
The "service" command only sometimes works on SME (so you should never use it).
 It is not aware of the   configuration database, nor is it aware of "supervise".

I'm still in a quandry why the original command
Code: [Select]
service network restartdoes not seem to work. I installed SME 7.6.1 on a box in the office and this command woks fine. So I don't get it. I'm now going to leave the program over the week and see if it goes off line.
Thanks.

Offline _alex

  • ***
  • 103
Re: Dansguardinan and restarting network
« Reply #3 on: January 15, 2013, 05:54:54 PM »
Indeed, that was not the correct command, mea culpa.

Code: [Select]
sv up /service/wan
Does what You want

Re: Dansguardinan and restarting network
« Reply #4 on: January 15, 2013, 06:17:51 PM »
Well to quote Cactus quoting someone else...
Quote
Be careful whose advice you buy, but be patient with those who supply it.
I will stick to my solution for the time being, but thanks for getting back and helping others who may mistakenly think that your first answer was right. I will pack your second answer away and if mine doenst work in the end, then I will try your answer.
Thank you for contributing.

Offline _alex

  • ***
  • 103

Re: Dansguardinan and restarting network
« Reply #6 on: January 15, 2013, 09:39:01 PM »
I apreciate the link.

I looked at it. Then I tried your solution, you provided, just for fun. But it didnt work. Strangely I could ping after using it, to take down the network.
It appears if you follow the thread that you provided then look at the bug tracker link at the end there is an issue with the various commands we have been using. (perhaps you provided the link to show me that)

http://bugs.contribs.org/show_bug.cgi?id=7047

It seems that depending on whether your using a static IP or not the commands will work or not work.
Anyway anyone who is also struggling with starting and stopping networks / ethernet cards might read that to get some clarity. It appears that this bug that has been submitted for version 8 was also in version 7 for me at least.
Regards.

Re: Dansguardinan and restarting network
« Reply #7 on: February 24, 2013, 06:14:26 AM »
Back to the original problem, why do you need to restart the network when updating DanG ? Why not just restart DanG service ? It might be that DG is seeing the network go down and hence stopping and not restarting. When I was having internet going down on a site due to modem/line issues, I could get the modem back up, the SME server lok ed good (I never rebooted it as it wasn't at fault) but network browsing would *sometimes* not come back up, yet you could ping the website. I found retsarting DanG fixed the web access.