Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[Conf] Squid e Ftp trasparent proxy.
View unanswered posts
View posts from last 24 hours
View posts from last 7 days

 
Reply to topic    Gentoo Forums Forum Index Forum italiano (Italian)
View previous topic :: View next topic  
Author Message
TeoBì
Apprentice
Apprentice


Joined: 31 May 2004
Posts: 150

PostPosted: Sat Oct 23, 2004 1:40 pm    Post subject: [Conf] Squid e Ftp trasparent proxy. Reply with quote

Salve ragazzi,
ho installato squid come proxy server che funziona correttamente.
Ho settato in firefox il proxy sulla porta 8080 e ho fatto la prova a scaricare dei file da qualche mega sia attaverso il protocollo http sia ftp; dopodiche sono andato su un altra macchina ho settato il proxy e ho riprovato a scaricare gli stessi files, solamente che questa volta lo scaricamento è stato istantaneo, quindi il proxy funziona correttamente.

Poi ho provato a fare un trasparent proxy , quindi ho tolto i setting del proxy dal browser e ho settato nel router linux la seguente regola:
Code:

iptables -A PREROUTING -t nat -i $LAN0 -p TCP --dport 80 -j REDIRECT --to-port 8080

e anche qui tutto è andato bene , però solo per il protocollo http per l'ftp invece il trasparent proxy non funzionava così ho provato ad aggiungere la seguente regola:
Code:

iptables -A PREROUTING -t nat -i $LAN0 -p TCP --dport 21 -j REDIRECT --to-port 8080

però neanche così il trasparent proxy ftp funzionava.

Qualcuno ha qualche idea, grazie e arrivederci.
Back to top
View user's profile Send private message
FonderiaDigitale
Veteran
Veteran


Joined: 06 Nov 2003
Posts: 1710
Location: Rome, Italy

PostPosted: Sat Oct 23, 2004 1:43 pm    Post subject: Reply with quote

anzitutto devi decidere come usare il tuo FTP, se in modalita' attiva o passiva. in ogni caso , ftp usa una porta in listening e una per il flusso di dati (20 passiva, 1024:65535 attiva), per cui devi aprire almeno una ulteriore porta.
ti consiglio comunque di usare ipt_conntrack_ftp, il modulo di iptables, fatto ad uopo per questo (per info vedi iptables -m modulo -h)
_________________
Come disse un amico, i sistemisti sono un po' come gli artigiani per l'informatica :)
Back to top
View user's profile Send private message
TeoBì
Apprentice
Apprentice


Joined: 31 May 2004
Posts: 150

PostPosted: Sat Oct 23, 2004 2:45 pm    Post subject: Reply with quote

Code:

anzitutto devi decidere come usare il tuo FTP, se in modalita' attiva o passiva. in ogni caso , ftp usa una porta in listening e una per il flusso di dati (20 passiva, 1024:65535 attiva), per cui devi aprire almeno una ulteriore porta.
ti consiglio comunque di usare ipt_conntrack_ftp, il modulo di iptables, fatto ad uopo per questo (per info vedi iptables -m modulo -h)


Ho provato con
Code:

iptables -m ipt_conntrack_ftp -h

ma ho avuto il seguente errore (io ho un kernel 2.4.x monolitico e cmp ho tutte le opzioni di netfilter selezionate)
Code:

iptables v1.2.9: Couldn't load match `ipt_conntrack_ftp':/lib/iptables/libipt_ipt_conntrack_ftp.so: cannot open shared object file: No such file or directory

Try `iptables -h' or 'iptables --help' for more information.

Back to top
View user's profile Send private message
comio
Advocate
Advocate


Joined: 03 Jul 2003
Posts: 2191
Location: Taranto

PostPosted: Sat Oct 23, 2004 5:26 pm    Post subject: Reply with quote

FonderiaDigitale wrote:
anzitutto devi decidere come usare il tuo FTP, se in modalita' attiva o passiva. in ogni caso , ftp usa una porta in listening e una per il flusso di dati (20 passiva, 1024:65535 attiva), per cui devi aprire almeno una ulteriore porta.
ti consiglio comunque di usare ipt_conntrack_ftp, il modulo di iptables, fatto ad uopo per questo (per info vedi iptables -m modulo -h)


credo che sia ip_conntrack_ftp.

ciao
_________________
RTFM!!!!

e

http://www.comio.it
:)
Back to top
View user's profile Send private message
xchris
Advocate
Advocate


Joined: 10 Jul 2003
Posts: 2824

PostPosted: Sat Oct 23, 2004 5:46 pm    Post subject: Reply with quote

se non ti interessa molto la funzionalita' di proxy come cache ma quanto come "separatore" puoi provare:

* net-ftp/jftpgw
Latest version available: 0.13.4-r1
Latest version installed: [ Not Installed ]
Size of downloaded files: 249 kB
Homepage: http://www.mcknight.de/jftpgw/
Description: A small FTP gateway
License: GPL-2

l'ho utilizzato con successo anche in modo trasparente.
ciao
_________________
while True:Gentoo()
Back to top
View user's profile Send private message
croot
Apprentice
Apprentice


Joined: 07 Jul 2004
Posts: 240
Location: Massa (toscana)

PostPosted: Sat Oct 23, 2004 7:26 pm    Post subject: Reply with quote

Squid supports ftp, gopher, and https only when clients of each specified protocol are aware of the cache. Hence this is not possible when squid is in transparent mode.

da qui
sapevo che ftp non era supportato in modalità trasparente ma non ero tanto sicuro.
ciao.
Back to top
View user's profile Send private message
TeoBì
Apprentice
Apprentice


Joined: 31 May 2004
Posts: 150

PostPosted: Sat Oct 23, 2004 8:07 pm    Post subject: Reply with quote

Grazie a tutti come al solito per l'aiuto dato, come dalla documentazione di squid non è possibile il trasparent proxy ftp.

Un salutone a tutti.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Forum italiano (Italian) All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum