ip_conntrack - table full

Florian Lohoff flo at rfc822.org
Tue Sep 7 12:53:40 CEST 2004


Hi,
ich habe auf ein paar maschinen die ein wenig port redirect machen das
problem das die ip_conntrack tabellen ueberlaufen (kernel 2.6 32768
connections)

Das problem ist das ich port 80 auf 3128 umleite (transparenter proxy).
Diese connections sind aber gar nicht das problem sondern vielmehr die
ganzen wuermer die connections auf 445 machen oder aber diverse p2p
applications die 6881 bis 6889 oder 4662 etc benutzen. Diese connections
brauche ich eigentlich gar nicht in der conntrack tabelle weil ich die
stump durchroute. 

D.h. ich sehe derzeit 2 moeglichkeiten die tablesize kleiner zu halten.
Das eine waere ein schnellerer expire der connections (port 445 kommt
meistens nicht zustande) oder aber das bestimmter traffic nicht ins
ip_conntrack laeuft.

Config - arp proxy zwischen eth0 und eth1

auto eth0
iface eth0 inet static
	[ ... ]
        up echo 1 >/proc/sys/net/ipv4/ip_forward
        up echo 1 >/proc/sys/net/ipv4/conf/eth0/proxy_arp
        up iptables -A FORWARD -p tcp -s 0.0.0.0/0 -d 0.0.0.0/0 --destination-port 445 -j ACCEPT

auto eth1
iface eth1 inet static
	[ ... ]
        up echo 1 >/proc/sys/net/ipv4/conf/eth1/proxy_arp
        up iptables -t nat -A PREROUTING -i eth1 -p tcp --dport 80 -j REDIRECT --to-port 3128

Die port 445 regel ist stumpf fuer einen MRTG der die Wurmaktivitaet
misst. Hinter der kiste ich in etwa 1024 addressen d.h. 4 Class-C die
zeitweise auch in benutzung sind.

Conntrack tabelle ohne aktive user:

cat /proc/net/ip_conntrack | grep dport | awk '{ print $8 }' | sort | uniq -c | sort -rn | head -10
   6249 dport=445
    860 dport=135
    113 dport=9898
     52 dport=1025
     45 dport=2745
     28 [UNREPLIED]
     24 dport=139
     16 dport=4662
     15 dport=6129
     11 dport=80

wc -l /proc/net/ip_conntrack
12281 /proc/net/ip_conntrack

Ich habe die Anzahl der connections schon auf 65536 hochgesetzt.

Flo
-- 
Florian Lohoff                  flo at rfc822.org             +49-171-2280134
                        Heisenberg may have been here.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <http://lug-owl.de/pipermail/linux/attachments/20040907/93f263db/attachment.sig>


More information about the Linux mailing list