squid配置对外网全部放开 但不能上传下载文件
时间: 2024-05-06 15:18:51 浏览: 14
要配置Squid允许上传和下载文件,您需要编辑Squid配置文件并添加以下行:
```
acl localnet src 192.168.0.0/16 # 本地网段
acl SSL_ports port 443
acl Safe_ports port 80 # http
acl Safe_ports port 21 # ftp
acl Safe_ports port 443 # https
acl Safe_ports port 70 # gopher
acl Safe_ports port 210 # wais
acl Safe_ports port 1025-65535 # unregistered ports
acl Safe_ports port 280 # http-mgmt
acl Safe_ports port 488 # gss-http
acl Safe_ports port 591 # filemaker
acl Safe_ports port 777 # multiling http
acl CONNECT method CONNECT
http_access allow localnet
http_access allow localhost
http_access deny !Safe_ports
http_access deny CONNECT !SSL_ports
http_access allow all
http_reply_access allow all
icp_access allow all
```
这将允许所有用户上传和下载文件。请注意,这将增加您网络的安全风险,因为它允许外部用户访问您网络中的所有文件。因此,您需要谨慎使用此配置。