SQUID proxy - open FTP (and other ports)
Posted
by
gaffcz
on Server Fault
See other posts from Server Fault
or by gaffcz
Published on 2011-11-24T09:47:33Z
Indexed on
2011/11/24
10:00 UTC
Read the original article
Hit count: 347
elpeHow can I open other ports than HTTP and HTTPS using SQUID proxy? I have last version of squid running on Fedora 10 but I'm not able to open FTP port.
part of my squid.conf:
acl manager proto cache_object
acl localhost src 127.0.0.1/32 ::1
acl to_localhost dst 127.0.0.0/8 0.0.0.0/32 ::1
acl ftp proto FTP
acl ftp_port port 21
always_direct allow FTP
acl SSL_ports port 443 20 21 22
acl Safe_ports port 20 # ftp
acl Safe_ports port 21 # ftp
acl Safe_ports port 22 # sftp
acl Safe_ports port 80 # http
acl Safe_ports port 280 # http-mgmt
acl Safe_ports port 443 # https
acl Safe_ports port 1025-65535 # uregistred ports
acl CONNECT method CONNECT
http_access allow manager localhost
http_access deny manager
# USER privilegies (encoded in file passwd)
auth_param basic program /usr/lib/squid/ncsa_auth /etc/squid/passwd
acl AUTHUSERS proxy_auth REQUIRED
# BLACKLIST (in file denied.conf)
acl denied_domains dstdomain "/etc/squid/DNDdomains.conf"
acl denied_regex url_regex "/etc/squid/DNDregex.conf"
http_access deny denied_regex
http_access deny denied_domains
http_access allow AUTHUSERS
http_access deny !Safe_ports
http_access deny CONNECT !SSL_ports
http_access allow ftp_port CONNECT
http_access allow ftp
http_access allow localhost
http_access deny all
#http_reply_access allow all
#http_access allow all
http_port 3128
hierarchy_stoplist cgi-bin ?
cache_dir ufs /var/spool/squid 10000 16 256
coredump_dir /var/spool/squid
refresh_pattern ^ftp: 1440 20% 10080
refresh_pattern -i (/cgi-bin/|\?) 0 0% 0
refresh_pattern . 0 20% 4320
I've tried to add:
- acl ftp proto FTP / acl ftp_port port 21
- http_access allow ftp
- add/remove ports 20,21 from SSL_PORTS list
- set the iptables
But nothing helped. It is even possible to use a new version of squid for FTP transfer?
© Server Fault or respective owner