我试图只允许一个 ip 连接到 squid 服务器,但是它似乎不起作用,我确实禁止了所有域并且只允许一个域,但是对于 ip 地址,它不起作用,我所做的是:
http_access allow localhost manager
http_access deny manager
# We strongly recommend the following be uncommented to protect innocent
# web applications running on the proxy server who think the only
# one who can access services on "localhost" is a local user
#http_access deny to_localhost
#
# INSERT YOUR OWN RULE(S) HERE TO ALLOW ACCESS FROM YOUR CLIENTS
#
include /etc/squid/conf.d/*
# Example rule allowing access from your local networks.
# Adapt localnet in the ACL section to list your (internal) IP networks
# from where browsing should be allowed
#http_access allow localnet
http_access allow localhost
# And finally deny all other access to this proxy
acl GOOD dstdomain .instagram.com
http_access allow GOOD
acl specialIP src 83.59.98.241
http_access allow specialIP
http_access deny all
答案1
我认为您缺少网络掩码。请尝试;
acl specialIP src 83.59.98.241/32
我不清楚你想做什么。你想要一个只能由一个特定 IP 管理的代理,还是想要一个拒绝访问所有网站(本例中是 Instagram)的代理?