[Gllug] TCP connections not closing
Formi
formi at blueyonder.co.uk
Mon Nov 10 12:09:16 UTC 2003
On Sun, 9 Nov 2003, Nix wrote:
> On Sat, 8 Nov 2003, formi moaned:
> > sysctl -a | grep -i ttl shows:
> >
> > net.ipv4.inet_peer_maxttl = 600
> > net.ipv4.inet_peer_minttl = 120
> > net.ipv4.ip_default_ttl = 64
> >
> > Any ideas why this is happening?
>
> Because these TTLs don't relate to NAT?
>
> The timeouts you want are in the tcp_timeouts[] array in
> net/ipv4/netfilter/ip_conntrack_proto_tcp.c; there is no way to adjust
> them without hacking the source.
>
> For reference, as of 2.4.22, they are:
>
> static unsigned long tcp_timeouts[]
> = { 30 MINS, /* TCP_CONNTRACK_NONE, */
> 5 DAYS, /* TCP_CONNTRACK_ESTABLISHED, */
> 2 MINS, /* TCP_CONNTRACK_SYN_SENT, */
> 60 SECS, /* TCP_CONNTRACK_SYN_RECV, */
> 2 MINS, /* TCP_CONNTRACK_FIN_WAIT, */
> 2 MINS, /* TCP_CONNTRACK_TIME_WAIT, */
> 10 SECS, /* TCP_CONNTRACK_CLOSE, */
> 60 SECS, /* TCP_CONNTRACK_CLOSE_WAIT, */
> 30 SECS, /* TCP_CONNTRACK_LAST_ACK, */
> 2 MINS, /* TCP_CONNTRACK_LISTEN, */
> };
>
> > Source Destination Proto State TTL
> > 82.35.34.114,58980 81.86.18.XXX,2200 tcp ESTABLISHED 119:59:59
> > 127.0.0.1,32772 127.0.0.1,53 udp 0:00:48
> > 192.168.1.25,1229 143.127.8.50,80 tcp ESTABLISHED 88:01:18
> > 192.168.1.25,1233 143.127.8.50,80 tcp ESTABLISHED 88:04:27
> > 192.168.1.25,1236 143.127.8.50,80 tcp ESTABLISHED 88:07:37
> > 192.168.1.22,1110 143.127.8.50,80 tcp ESTABLISHED 87:51:01
> > 192.168.1.22,1151 143.127.8.50,80 tcp ESTABLISHED 87:57:22
> > 192.168.1.22,1112 143.127.8.50,80 tcp ESTABLISHED 87:54:13
>
> You're misreading this display: that 119:59:59 is 119 *hours*, not 119
> *minutes*. So I'd expect it to be still alive.
>
Yes I'm aware about that, I've seen it before.
What I don't get is why those particular connections are still hanging
off when other ones have timed-out? And probably this is basic tcp stuff,
but which machine sets the TTL, the web server or the client?
What's the point of having a connection open for 5 days? And why hasn't
the gateway machine closed it? It should know nothing has been flowing
all this time.
> Most of those connections have seen no traffic for a good few days, but
> their initial timeout was consistent with that for a connection in
> ESTABLISHED state.
>
If you reply could you remove my email address? Thanks.
Formi.
--
Gllug mailing list - Gllug at linux.co.uk
http://list.ftech.net/mailman/listinfo/gllug
More information about the GLLUG
mailing list