All of lore.kernel.org
 help / color / mirror / Atom feed
* ftp contrack
@ 2005-01-23 23:57 Mario Ohnewald
  2005-01-25 12:15 ` Filip Sneppe
  0 siblings, 1 reply; 9+ messages in thread
From: Mario Ohnewald @ 2005-01-23 23:57 UTC (permalink / raw)
  To: netfilter

Hello List!

I am trying to redirect (NAT) to a internal ftp box (but both have a public
ip).
I am using those rules:

modprobe ip_conntrack_ftp ports=21,2121
modprobe ip_nat_ftp
iptables -t nat -A PREROUTING -d $FW -p tcp --dport 2121 -j DNAT --to
$FTP:21
iptables -A POSTROUTING -t nat -d $FTP -p tcp --dport 21 -j SNAT --to
$FW:2121


They kind of worked for a while. The forwarding of port 21 to 2121 worked
one out of 10 times maybe.

Now the packets dont get forwarded at all anymore.
/proc/sys/net/ipv4/ip_forward is set to 1.

Default policy is set to ACCEPT when i am testing it.
With tcpdump i see the packets coming in, but they don`t get forwarded.


Any idea what i am doing wrong?


Cheers, Mario

-- 
Sparen beginnt mit GMX DSL: http://www.gmx.net/de/go/dsl


^ permalink raw reply	[flat|nested] 9+ messages in thread
* RE: ftp contrack
@ 2005-01-25 20:04 Piszcz, Justin Michael
  2005-01-26 13:29 ` Jose Maria Lopez
  0 siblings, 1 reply; 9+ messages in thread
From: Piszcz, Justin Michael @ 2005-01-25 20:04 UTC (permalink / raw)
  To: Jose Maria Lopez, netfilter

2121 is used for frox ftp proxy

-----Original Message-----
From: netfilter-bounces@lists.netfilter.org [mailto:netfilter-bounces@lists.netfilter.org] On Behalf Of Jose Maria Lopez
Sent: Tuesday, January 25, 2005 7:53 AM
To: netfilter@lists.netfilter.org
Subject: Re: ftp contrack

El mar, 25 de 01 de 2005 a las 13:15, Filip Sneppe escribió:
> On Mon, 24 Jan 2005 00:57:14 +0100 (MET), Mario Ohnewald
> <mario.Ohnewald@gmx.de> wrote:
> > Hello List!
> > 
> > I am trying to redirect (NAT) to a internal ftp box (but both have a public
> > ip).
> > I am using those rules:
> > 
> > modprobe ip_conntrack_ftp ports=21,2121
> > modprobe ip_nat_ftp
> 
> Hi Mario, 
> 
> Add "ports=21,2121" to the "modprobe ip_nat_ftp" command.
> That should do the trick.
> 
> modprobe ip_nat_ftp ports=21,2121
> 
> Regards,
> Filip

Maybe it's a stupid question, but...
Why are you using port 2121 for ftp?
I couldn't find any information on it being used.

Regards.

-- 
Jose Maria Lopez Hernandez
Director Tecnico de bgSEC
jkerouac@bgsec.com
bgSEC Seguridad y Consultoria de Sistemas Informaticos
http://www.bgsec.com
ESPAÑA

The only people for me are the mad ones -- the ones who are mad to live,
mad to talk, mad to be saved, desirous of everything at the same time,
the ones who never yawn or say a commonplace thing, but burn, burn, burn
like fabulous yellow Roman candles.
                -- Jack Kerouac, "On the Road"




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

end of thread, other threads:[~2005-01-26 13:29 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-01-23 23:57 ftp contrack Mario Ohnewald
2005-01-25 12:15 ` Filip Sneppe
2005-01-25 12:53   ` Jose Maria Lopez
2005-01-25  9:50     ` Mario Ohnewald
2005-01-25 13:43       ` Filip Sneppe
2005-01-25 10:20         ` Mario Ohnewald
2005-01-25 15:25           ` Filip Sneppe
  -- strict thread matches above, loose matches on Subject: below --
2005-01-25 20:04 Piszcz, Justin Michael
2005-01-26 13:29 ` Jose Maria Lopez

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.