problem when use linux2.4 as firewall

2002-05-16 Thread Ö£´«²¨


i met some problem when use linux2.4 as our firewall. when we use linux2.2 as our 
firewall it worked well.but when we upgraded to  linux2.4 on the same machine,the 
firewall always lost packets. anyone met the same problem?
when i run ping from one side to the other side of the firewall,the packet loss is 
almost 20%.
someone told me that maybe something is wrong with my switch,but linux2.2 worked 
well.i'm confused. is there some problem with stateful packet filter in linux2.4?

zheng chuanbo





Re: problem when use linux2.4 as firewall

2002-04-23 Thread Mikkel Refsgaard Bech

Hi,

We have a theory about the cause of your problem; when a connection is
established thorugh your firewall an entry is created in a table that
track these connections. As you already know these connections can be seen
by reading the file /proc/net/ip_conntrack. The entries in this table are
removed 2 minutes _after_ the (TCP) connection is terminated. The reason
that the entry is not removed immediatly is that TCP keep the socket open
for a while after the connection is closed, to answer retransmitted FIN
packets. If the traffic that goes through the firewall consist of many
short connections (e.g. web traffic), the table that track the connections
may be filled with entries for which the actual connection is already
closed. You can check this by looking for connections that have the label
TIME_WAIT when you cat/grep ip_conntrack.

Connection tracking in netfilter allows 8192 connections with 128M memory
(calculations based on comments in ip_conntrack_core.c). Check your kernel
log for a line like ip_conntrack (1024 buckets, 8192 max), the max is the
max number of connections allowed. You should also check your kernel log
for lines stating Can't allocate conntrack. or ip_conntrack: table
full, dropping packet. which indicate a problem with memory or the max
limit.

On April 9th we posted a patch to netfilter/iptables that can be used to
specify how long an entry in the connection tracking table should remain
in the table after the actual connection is terminated. See:
http://lists.samba.org/pipermail/netfilter-devel/2002-April/004076.html
for the patch and a description of it.

There must be others who use netfilter in a production environment like
yours. Anyone on netfilter-devel have experiences with this high
connection load? or does anyone have another solution to this problem?
Maybe you could just recompile with a higher limit.

If you use our patch we would be very interested in hearing about your
experiences (or any bugs) or any other solutions you may find.

Regards,
Mikkel, Torben, Carsten
{mrb,mariachi,stiborg}@cs.auc.dk

BTW: we use this tool to monitor the connection tracking table; iptstate -
http://home.earthlink.net/~jaymzh666/iptstate/


On Mon, 22 Apr 2002, zheng wrote:

   we use linux 2.4 as a firewall.the machine has 128M memory and we have
 about 200 people behind the firewall. we met some problem.sometimes the
 firewall costs up its resources and goes down.i checked with 'top' and
 found that the memory is used up.  the file /proc/net/ip_conntrack
 records all the connnections,and it grows fast. i think this may be the
 problem.
   how to solve the problem? to increase the memory is a solution,but
 that will not solve all the problem.or to get rid of ip_conntrack when
 compile the kernel? but we have to use nat.
   anyone have some good idea on it?thanks for help.

 zheng chuanbo














problem when use linux2.4 as firewall

2002-04-22 Thread zheng

  we use linux 2.4 as a firewall.the machine has 128M memory and we have about 200 
people behind the firewall. we met some problem.sometimes the firewall costs up its 
resources and goes down.i checked with 'top' and found that the memory is used up.  
the file /proc/net/ip_conntrack records all the connnections,and it grows fast. i 
think this may be the problem.
  how to solve the problem? to increase the memory is a solution,but that will not 
solve all the problem.or to get rid of ip_conntrack when compile the kernel? but we 
have to use nat.
  anyone have some good idea on it?thanks for help.

zheng chuanbo 


_
Do You Yahoo!?
Get your free yahoo.com address at http://mail.yahoo.com