1

I haven't used squid in a while so I wouldn't be surprised if I am off on the configuration. But essentially, I am trying to set up a proxy server with Squid so that I can do this:

Client (my local PC) -> Squid proxy server -> FTP server (foo.bar.net)

I followed a few tutorials online and things seemed pretty straightforward. I have part of my configuration here:

acl localnet src 10.0.0.0/8 # RFC1918 possible internal network
acl localnet src 172.16.0.0/12  # RFC1918 possible internal network
acl localnet src 192.168.0.0/16 # RFC1918 possible internal network
acl ftp proto FTP
acl ftp_port port 21
acl SSL_ports port 443 21
acl Safe_ports port 20      # ftp port
acl Safe_ports port 80      # http
acl Safe_ports port 21      # ftp
acl Safe_ports port 280     # http-mgmt
acl CONNECT method CONNECT
acl ftp_port port 21
http_access allow ftp ftp_port
http_access allow ftp_port CONNECT
http_access deny !Safe_ports
http_access deny CONNECT !SSL_ports
http_access allow localhost manager
http_access deny manager
http_access allow localhost
http_access deny all
http_port 3128
http_port 21
acl local-servers dstdomain foo.bar.net
always_direct allow local-servers
acl FTP proto FTP
always_direct allow FTP

When I reload the service, I see that it binds to the configured ports. But when I go on my local PC and use CyberDuck to connect, nothing is logged in squid's access_log. This does not give me a whole lot of confidence that this is configured correctly since it is not logging any kind of attempted access to the FTP server. Is there something I am doing wrong?

0

I have not configured squid before, so someone more versed will be able to help you.

In your .ssh/config, do you have a ProxyCommand line? I also recall at one point needing to have netcat installed.

My line in .ssh/config looked like this:

Host sftp.example.com
        ProxyCommand ssh root@proxy.example.com nc %h %p
  • Thank you for this information, but the way i understand this is that squid will be the proxy server that should be listening to and forwarding ftp requests to foo.bar.net. I dont think adding a host in my ssh configuration will help much... – ryekayo Jun 6 '17 at 14:42

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.