[squid-users] Client <--> Squid <--> FTP usecase

Amos Jeffries squid3 at treenet.co.nz
Thu Sep 17 13:24:07 UTC 2020


On 17/09/20 8:51 pm, piyush.gaba wrote:
> Hi All,
> 
> 
> I have been working to check squid v4.13 functionality with a FTP.
> 
> My use case is simple and it says we have a file on FTP at root and I
> just have to wget that file from my client.
> 

Then simply have Squid setup as a normal proxy and use:

  wget -X ${squid.IP}:${Squid.Port} \
    -m ftp://<id>:<pass>@${FTP.Prod_IP}/test.txt


>  
> 
> So I have,
> 
>  > 
> àCreated a file on root of FTP “*touch test.txt*”
> 
> àAllowed the destination IP of FTP in my squid.conf
> 
>  
> 
> Then I have exported proxy on my *client* as
> 
> *export ftp_proxy=http://${squid.IP}:${Squid.Port}/*
> 
> and
> 
> Now when I try to download the file like this,
> 
> *wget -m ftp://<id>:<pass>@${FTP.Prod_IP}/test.txt*
> 
>  
> 
> I am facing below error on *client*:
> 
>  
> 
> *Proxy request sent, awaiting response... 502 Bad Gateway*
> 
> * *
> 
> which indicates that the squid (server acting as a proxy) was not able
> to get a valid or any response from the FTP server.
> 
> So, I tried wget directly from my *squid* to *FTP, *it ended in error,
> 

What? exact details of this alternative command please.

>  
> 
> *“Logging in as root ... Error in server greeting. Retrying.” *(which is
> my concern)**
> 
>  
> 
> It’d be great, If there is any advice I could get from you guys as about
> where I am wrong or what am I missing.
> 

Make use of the wget --verbose debugging output and Squid logs to get
more information about what is actually going on.


Amos


More information about the squid-users mailing list