Networking Forums

Networking Forums > Computer Networking > Linux Networking > ip_conntrack garbage

Reply
Thread Tools Display Modes

ip_conntrack garbage

 
 
Jim Garrison
Guest
Posts: n/a

 
      12-27-2005, 07:24 PM
Yesterday I ran an nmap portscan on our internal network
from our Linux router/firewall (FC4 kernel 2.6.14-1.1653).

Today I was looking in /proc/net/ip_conntrack and see one
[UNREPLIED] entry for each unsuccessful probe (i.e. one per
internal unallocated IP address) in the table.

Aren't these supposed to go away after a while? They've been
in the conntrack table now for about 22 hours.

Is this a bug? If they don't go away, will my conntrack table
eventually fill up?

Can I change the timeout value or flush the conntrack table
to clean up the stale entries?

TIA

Jim Garrison
(E-Mail Removed)
 
Reply With Quote
 
 
 
 
Grant
Guest
Posts: n/a

 
      12-27-2005, 07:41 PM
On Tue, 27 Dec 2005 14:24:55 -0600, Jim Garrison <(E-Mail Removed)> wrote:

>Yesterday I ran an nmap portscan on our internal network
>from our Linux router/firewall (FC4 kernel 2.6.14-1.1653).
>
>Today I was looking in /proc/net/ip_conntrack and see one
>[UNREPLIED] entry for each unsuccessful probe (i.e. one per
>internal unallocated IP address) in the table.
>
>Aren't these supposed to go away after a while? They've been
>in the conntrack table now for about 22 hours.


That's okay, just over four days to go ;-)
>
>Is this a bug? If they don't go away, will my conntrack table
>eventually fill up?

No. Yes.
>
>Can I change the timeout value or flush the conntrack table
>to clean up the stale entries?


Why bother, the stale entries will be reused when required.

Grant.
 
Reply With Quote
 
Jim Garrison
Guest
Posts: n/a

 
      12-27-2005, 07:52 PM


Grant wrote:
>>Aren't these supposed to go away after a while? They've been
>>in the conntrack table now for about 22 hours.

>
> That's okay, just over four days to go ;-)


So [UNREPLIED] is considered equivalent to [ESTABLISHED]
and uses the ip_conntrack_tcp_timeout_established timer?

Just curious, but why isn't the syn_sent timeout (120 sec)
used?
 
Reply With Quote
 
David Schwartz
Guest
Posts: n/a

 
      12-27-2005, 08:59 PM

"Jim Garrison" <(E-Mail Removed)> wrote in message
news:44qdnRnOHZQeNCzeRVn-(E-Mail Removed)...

> Grant wrote:


>>>Aren't these supposed to go away after a while? They've been
>>>in the conntrack table now for about 22 hours.


>> That's okay, just over four days to go ;-)


> So [UNREPLIED] is considered equivalent to [ESTABLISHED]
> and uses the ip_conntrack_tcp_timeout_established timer?


> Just curious, but why isn't the syn_sent timeout (120 sec)
> used?


It is totally reasonable for a reply to come more than 2 minutes after
the original packet.

DS


 
Reply With Quote
 
Grant
Guest
Posts: n/a

 
      12-27-2005, 09:30 PM
On Tue, 27 Dec 2005 14:52:16 -0600, Jim Garrison <(E-Mail Removed)> wrote:

>
>
>Grant wrote:
>>>Aren't these supposed to go away after a while? They've been
>>>in the conntrack table now for about 22 hours.

>>
>> That's okay, just over four days to go ;-)

>
>So [UNREPLIED] is considered equivalent to [ESTABLISHED]
>and uses the ip_conntrack_tcp_timeout_established timer?


Dunno, is the timeout field showing that? I suspect the entry
stays until the 'slot' is required, as this is event driven code.

No reply == nothing to clear the entry, been a while since I
watched conntrack in action.

Grant.
 
Reply With Quote
 
Scott R. Haven
Guest
Posts: n/a

 
      01-02-2006, 01:29 PM
David Schwartz wrote:
> "Jim Garrison" <(E-Mail Removed)> wrote in message
> news:44qdnRnOHZQeNCzeRVn-(E-Mail Removed)...
>
>
>>Grant wrote:

>
>
>>>>Aren't these supposed to go away after a while? They've been
>>>>in the conntrack table now for about 22 hours.

>
>
>>>That's okay, just over four days to go ;-)

>
>
>>So [UNREPLIED] is considered equivalent to [ESTABLISHED]
>>and uses the ip_conntrack_tcp_timeout_established timer?

>
>
>>Just curious, but why isn't the syn_sent timeout (120 sec)
>>used?

>
>
> It is totally reasonable for a reply to come more than 2 minutes after
> the original packet.
>
> DS
>
>


FYI if it is important enough to you it can be changed in the kernel
source code. I'm unaware of a better solution.

I prefer 2 hours for unreplied established connections. This helps
against ACK attacks and the like. For most servers its no big deal, for
a firewall it might be.

The default is 5 days I believe. Near as I can tell you have to reboot
to clear it.

Scott R. Haven
Sr. Systems Engineer
Paisley Systems Inc.
www.paisleysystems.com


 
Reply With Quote
 
Scott R. Haven
Guest
Posts: n/a

 
      01-02-2006, 01:32 PM
Jim Garrison wrote:
> Yesterday I ran an nmap portscan on our internal network
> from our Linux router/firewall (FC4 kernel 2.6.14-1.1653).
>
> Today I was looking in /proc/net/ip_conntrack and see one
> [UNREPLIED] entry for each unsuccessful probe (i.e. one per
> internal unallocated IP address) in the table.
>
> Aren't these supposed to go away after a while? They've been
> in the conntrack table now for about 22 hours.
>
> Is this a bug? If they don't go away, will my conntrack table
> eventually fill up?
>
> Can I change the timeout value or flush the conntrack table
> to clean up the stale entries?
>
> TIA
>
> Jim Garrison
> (E-Mail Removed)


Jim,

One more thing I forgot in my reply...

It may fill up, but probably not. You can adjust it in

/etc/sysctl.conf

net.ipv4.ip_conntrack_max =

Scott R. Haven
Sr. Systems Engineer
Paisley Systems Inc.
www.paisleysystems.com



 
Reply With Quote
 
 
 
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
NAT keep alive ip_conntrack Andreas Mueller Linux Networking 0 05-02-2009 01:51 PM
tcp timeouts and ip_conntrack nsa.usa@gmail.com Linux Networking 1 04-09-2007 06:49 PM
Mac OS X Garbage Dave Slinn Windows Networking 3 01-11-2006 03:47 PM
730 garbage after SP2 Broadband Hardware 0 08-13-2004 05:48 PM
MN-700 is Garbage Broadband Hardware 3 05-16-2004 02:46 PM



1 2 3 4 5 6 7 8 9 10 11