SQUID: How to disable authentication?

后端 未结 4 1795
甜味超标
甜味超标 2021-01-19 20:53

I have a working Squid with authentication. How do I temporarily disable authentication? Can I just comment out the following lines below from squid.conf:

acl ncsa_u

4条回答
  •  夕颜
    夕颜 (楼主)
    2021-01-19 21:53

    This worked for me, only defined IP allowed to use squid

    ######################## Begin SQUID Config ########################
    dns_v4_first on
    dns_nameservers 8.8.8.8 8.8.4.4
    # should be allowed
    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 localnet src fc00::/7       # RFC 4193 local private network range
    acl localnet src fe80::/10      # RFC 4291 link-local (directly plugged) machines
    acl Safe_ports port 1-65535 # unregistered ports
    acl allowed_user1 src  182.0.0.0/12  all
    acl allowed_user2 src  182.1.0.0/12 all
    acl allowed_user3 src  114.120.0.0/12  all
    acl allowed_user4 src  114.124.0.0/12  all
    acl allowed_user5 src  114.125.0.0/12  all
    acl allowed_user6 src  114.127.0.0/12  all
    acl allowed_user7 src  202.3.0.0/12  all
    acl CONNECT method CONNECT
    http_port 8080
    http_access allow allowed_user1
    http_access allow allowed_user2
    http_access allow allowed_user3
    http_access allow allowed_user4
    http_access allow allowed_user5
    http_access allow allowed_user6
    http_access allow allowed_user7
    
    # visible_hostname 192.168.1.1
    ### disable cache ###
    cache deny all
    ### Anonymizing traffic ###
    forwarded_for delete
    request_header_access X-Forwarded-For deny all
    request_header_access Via  deny all
    ############## END squid3 CONFIG ###################
    

提交回复
热议问题