netfilter.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Connection Tracking
@ 2003-10-06 17:46 Nathan Whittacre
  2003-10-08 16:46 ` Jim Carter
  0 siblings, 1 reply; 13+ messages in thread
From: Nathan Whittacre @ 2003-10-06 17:46 UTC (permalink / raw)
  To: netfilter

I have the following situation:

A server for what is called directed host sits behind a NAT'd firewall
with a local IP.  I have port 1066 forwarded to that server(10.2.0.1).
The way this protocol works is that the remote computer connects to it
on port 1066, exchanges some data over the existing connection and then
the server initiates a connection back to the client on the client's
port 1066.  This is fine as long as the client has a static, un-NAT'd
internet IP, but the connection is dropped by the server if it does not
get a reply from port 1066.  I have a few client machines on a NAT'd
network that need to connect to this remote server, but with only one
gateway internet IP.  They do not necessarily need to connect at the
same time.  Is there any way to write a connection tracking script that
senses the outbound connection to port 1066 on the remote side and then
DNATs the inbound 1066 to the local IP once the connection is established?

I have a tcpdump of the connection avaiable if that would be of any help.

Thank you,
Nathan Whittacre




^ permalink raw reply	[flat|nested] 13+ messages in thread
* Connection Tracking
@ 2012-09-03 16:35 Nicole
  2012-09-04 11:30 ` Pablo Neira Ayuso
  0 siblings, 1 reply; 13+ messages in thread
From: Nicole @ 2012-09-03 16:35 UTC (permalink / raw)
  To: netfilter

Hello everyone,

I would be grateful for some advice. Am writing a target using xtables.
This target saves and restores a field in the IPv{4,6} header to/from
the connection mark.

I have read Jan Engelhardt's booklet (3 July 2012), but remain unclear
on how to ensure that connection tracking is turned on.

My difficulty arises in the following code snippet:

        const struct nf_conn *ct;
        ct = nf_ct_get(skb, &ctinfo);
        if (ct == NULL) {
                return false;
        }
	/* use ct-> */

ct is always false and therefore I cannot do the save and restore.

Any suggestions?

Many thanks

Nicole

^ permalink raw reply	[flat|nested] 13+ messages in thread
* Connection Tracking
@ 2003-10-06 17:42 Nathan Whittacre
  0 siblings, 0 replies; 13+ messages in thread
From: Nathan Whittacre @ 2003-10-06 17:42 UTC (permalink / raw)
  To: netfilter

I have the following situation:

A server for what is called directed host sits behind a NAT'd firewall 
with a local IP.  I have port 1066 forwarded to that server(10.2.0.1). 
The way this protocol works is that the remote computer connects to it 
on port 1066, exchanges some data over the existing connection and then 
the server initiates a connection back to the client on the client's 
port 1066.  This is fine as long as the client has a static, un-NAT'd 
internet IP, but the connection is dropped by the server if it does not 
get a reply from port 1066.  I have a few client machines on a NAT'd 
network that need to connect to this remote server, but with only one 
gateway internet IP.  They do not necessarily need to connect at the 
same time.  Is there any way to write a connection tracking script that 
senses the outbound connection to port 1066 on the remote side and then 
DNATs the inbound 1066 to the local IP once the connection is established?

I have a tcpdump of the connection avaiable if that would be of any help.

Thank you,
Nathan Whittacre



^ permalink raw reply	[flat|nested] 13+ messages in thread
* Connection Tracking
@ 2003-01-09  6:40 Amit Kumar Gupta
  0 siblings, 0 replies; 13+ messages in thread
From: Amit Kumar Gupta @ 2003-01-09  6:40 UTC (permalink / raw)
  To: netfilter

[-- Attachment #1: Type: text/plain, Size: 621 bytes --]

Oops ,

I forget to change the subject.

Sorry for inconvenience.

Regards,
Amit

-----Original Message-----
From: Amit Kumar Gupta 
Sent: Thursday, January 09, 2003 12:09 PM
To: Amit Kumar Gupta
Cc: Netfilter
Subject: RE: can't load the script


Hi All,

I am getting some problem in Connection tracking.

As soon as I execute a program (Having iptables rules), 
It keeps printing the following messages on the screen :-

Ip_contrack: maximum limit of 1016 entries exceeded.

Any the speed becomes damn slow.

Can anybody suggest what is happening?

Thanks & Regards,

Amit Kumar Gupta.

[-- Attachment #2: Wipro_Disclaimer.txt --]
[-- Type: text/plain, Size: 522 bytes --]

**************************Disclaimer**************************************************    
 
 Information contained in this E-MAIL being proprietary to Wipro Limited is 'privileged' 
and 'confidential' and intended for use only by the individual or entity to which it is 
addressed. You are notified that any use, copying or dissemination of the information 
contained in the E-MAIL in any manner whatsoever is strictly prohibited.

****************************************************************************************

^ permalink raw reply	[flat|nested] 13+ messages in thread
* RE: Connection Tracking
@ 2002-06-21 15:25 Preston Wade
  0 siblings, 0 replies; 13+ messages in thread
From: Preston Wade @ 2002-06-21 15:25 UTC (permalink / raw)
  To: 'netfilter@lists.samba.org'

Thanks to all that responded.  I guess I need another cup of coffee.  I
completely forgot that if a connection gets closed by either side it moves
into a different state which will put it to one of the other timeout vaules
specified in /usr/src/linux/net/ipv4/netfilter/ip_conntrack_proto_tcp.c
Thanks,
Preston


> -----Original Message-----
> From:	"Antony Stone" <Antony@Soft-Solutions.co.uk>@INTERNET@HHC 
> Sent:	Friday, June 21, 2002 10:06 AM
> To:	'netfilter@lists.samba.org'
> Subject:	Re: Connection Tracking
> 
> On Friday 21 June 2002 3:54 pm, Preston Wade wrote:
> 
> > Hello All,
> >
> > I am curious to get other peoples thoughts about the 5 Day timeout for
> the
> > following variable: TCP_CONNTRACK_ESTABLISHED.
> 
> 5 days is the value specified in TCP standards, but bear in mind this is
> only
> relevant for connections which have been established (SYN, SYN/ACK, ACK)
> but
> which have not been terminated (FIN or RST).   Connections which get ended
> by
> one party or the other will get removed from the table and the timeout is
> no
> longer relevant.
> 
> > This value seems high for
> > high traffic firewalls.  For instance if I wanted to use netfilter for a
> > firewall between my corporate network and my WAN, which has roughly 2300
> > nodes and 40000 users.  It seems to me like you would run out of STATE
> > memory and with most connection being TCP it would take 5 days before
> most
> > of them would timeout.
> 
> Do you really have large numbers of ESTABLISHED connections which are left
> in
> an open state by clients / servers, instead of being nicely killed off
> with
> FIN or RST packets ?
> 
> The onyl time I've seen this being a real problem was last summer, when
> Nimda
> and Code Red infections started setting up thousands of half-open
> connections
> to machines which couldn't cope with the load....
> 
> > I realize I could modify the value and recompile...
> > although it would be nice to be able to modify these with sysctl.conf or
> > via the /proc filesystem.
> 
> I believe it is possible to change this value on the fly using the
> /proc/sys/net/ipv4 filesystem, although I can't point you at the relevant
> name to use - maybe someone else on this list can remember ?
> 
> 
> 
> Antony.
> 
> 



^ permalink raw reply	[flat|nested] 13+ messages in thread
* Connection Tracking
@ 2002-06-21 14:54 Preston Wade
  2002-06-21 15:03 ` Ramin Alidousti
                   ` (2 more replies)
  0 siblings, 3 replies; 13+ messages in thread
From: Preston Wade @ 2002-06-21 14:54 UTC (permalink / raw)
  To: 'netfilter@lists.samba.org'

Hello All,

I am curious to get other peoples thoughts about the 5 Day timeout for the
following variable: TCP_CONNTRACK_ESTABLISHED.  This value seems high for
high traffic firewalls.  For instance if I wanted to use netfilter for a
firewall between my corporate network and my WAN, which has roughly 2300
nodes and 40000 users.  It seems to me like you would run out of STATE
memory and with most connection being TCP it would take 5 days before most
of them would timeout.  I realize I could modify the value and recompile...
although it would be nice to be able to modify these with sysctl.conf or via
the /proc filesystem.

Thanks,
Preston



^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2012-09-04 11:30 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-10-06 17:46 Connection Tracking Nathan Whittacre
2003-10-08 16:46 ` Jim Carter
2003-10-08 17:41   ` Nathan Whittacre
2003-10-08 18:09     ` Jim Carter
  -- strict thread matches above, loose matches on Subject: below --
2012-09-03 16:35 Nicole
2012-09-04 11:30 ` Pablo Neira Ayuso
2003-10-06 17:42 Nathan Whittacre
2003-01-09  6:40 Amit Kumar Gupta
2002-06-21 15:25 Preston Wade
2002-06-21 14:54 Preston Wade
2002-06-21 15:03 ` Ramin Alidousti
2002-06-21 15:05 ` Antony Stone
2002-06-21 15:16 ` Patrick Schaaf

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).