Re: Iptables FTP
Salut,
Essaie ça, chez moi ça marche :
modprobe ip_nat_ftp
modprobe ip_conntrack_ftp
PORTS="1024:65535"
IFACEINT="eth0"
iptables -A INPUT -i $IFACEINT -p tcp --sport 21 -m state --state NEW,ESTABLISH
ED,RELATED -j ACCEPT
iptables -A OUTPUT -o $IFACEINT -p tcp --dport 21 -m state --state NEW,ESTABLISH
ED,RELATED -j ACCEPT
# ftp actif
iptables -A INPUT -i $IFACEINT -p tcp --sport 20 -m state --state ESTABLISHED,R
ELATED -j ACCEPT
iptables -A OUTPUT -o $IFACEINT -p tcp --dport 20 -m state --state ESTABLISHED -
j ACCEPT
#ftp passif
iptables -A INPUT -i $IFACEINT -p tcp --sport $PORTS --dport $PORTS -m state --
state ESTABLISHED -j ACCEPT
iptables -A OUTPUT -o $IFACEINT -p tcp --sport $PORTS --dport $PORTS -m state --
state ESTABLISHED,RELATED -j ACCEPT
Bon courage,
Guillaume
On Wed, 19 Jun 2002 12:58:24 +0200
regis <luminix@wanadoo.fr> wrote:
> Le Mercredi 19 Juin 2002 12:13, Rénald CASAGRAUDE a écrit :
> > On mercredi, juin 19, 2002, at 11:26 , regis wrote:
> > > Voila le problème je suis bien connecté a mon serveur ftp mais je ne
> > > peux lui
> > > passer aucune commande :-((
> > >
> > > Par contre quand je désactive mon firewall tous marche donc pas de
> > > problème
> > > du coté du serveur FTP
> > >
> > > Donc si vous avez des idées je suis preneurs
> >
> > Hello !
> >
> > Peut-être :
> > sur ton serveur ftp :
> >
> > # /sbin/modprobe ip_conntrack_ftp
> > # iptables -t filter -P INPUT DROP
> > # iptables -A INPUT -i eth0 -s 192.168.0.7 -m state --state
> > ESTABLISHED,RELATED -j ACCEPT
> > # iptables -A INPUT -i eth0 -s 192.168.0.7 -p tcp --dport 21 -j ACCEPT
>
> Non celas ne marche pas :-(
>
> Merci quand même de ton aide
>
> Apparament il faut que j'utilise le related
>
> Extrait de la manpages:
> «and RELATED meaning that the packet is starting a new connection, but is
> associated with an existing connection, such as an FTP data transfer, or
> an ICMP error»
>
> Donc je continue mes recherches et des que j'y arrive je vous explqiue
> comment j'ai fait ;-)
>
> A+
>
>
> --
> To UNSUBSCRIBE, email to debian-user-french-request@lists.debian.org
> with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
>
>
---
Guillaume Magery - Stagiaire administration réseaux ESDS
http://www.magery.org
--
To UNSUBSCRIBE, email to debian-user-french-request@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Reply to: