[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: IP forwarding drops out -- more data



On Thu, 05 Jun 2008 10:03:09 -0700, Andrew Sackville-West wrote:

> On Thu, Jun 05, 2008 at 11:11:55AM -0400, hendrik@topoi.pooq.com wrote:
>> I have my network front end running Debian sarge (yet, it's time to 
>> upgrade at lest to etch).  It's connected to the rest of the net by a 
>> DSL line.  I've set up port-forwarding to selected machines on my LAN 
>> for the convenience of certain games, and bittorrent, and I'd like to 
>> use it for some always-on applications.
>> 
>> But every now and then, once every week or two, the port-forwarding 
>> drops out, and I have to reestablish it by running the same script that 
>> gets run on startup.
>> 
>> Does anyone have any idea how to track down the problem?  I've looked at 
>> the system logs and not found anything suspicious.  But probably I don't 
>> know which logs to look in, or what to look for in them, and it would be 
>> as plain as day if I did.
>> 
>> If this is a known sarge problem, of course upgrading to etch would be 
>> the solution.
> 
> just a couple of suggestions. 
> 
> 1) if you're planning to upgrade, go ahead and do it, the problem may
> just go away. That doesn't really necessarily solve the problem
> though...
> 
> 2) does your DSL connection go down from time to time? maybe it's
> dropping out and the system isn't recovering properly.
> 
> 3) next time it goes down, instead of just rerunning the network
> scripts, see if you can diagnose the situation a little bit. look at
> the output of 
> 
> ifconfig
> route
> and maybe get a dump from iptables.
> 
> then compare to the state of things when the system is working. 
> 
> A

OK.  It happened again, just now.  My son complained that the internet was
down.  I ssh'ed to my gateway machine, and ppp0 was up, but had a
suspiciously low packet count (about 150 packets)  within a few seconds
it was up to about 250, so it looked as if ppp0 had just come up.

I checked my iptables, and the port forwarding had shut down. 
I ran the script is uses to start port-forwarding at boot
time, and it was up and running again in no time.

I went and looked at syslog.  It looks very much as if the
ppp0 connection had shut down for a minute or two, and was
automatically restarted.  Apparently shutdown of ppp0 was
enough to kill all the port-forwarding instructions
relating to it (which was all of them), and the script did
not get run when the ppp0 connection was reestablished.

So, the question becomes,
  (a) how do I ensure that the script gets rerun when ppp0 comes
  up
or
  (b) How do I keep the forwarding from being dropped when ppp0 goes down?

-- hendrik


Reply to: