i'm trying to launch what should be a simple commercial proxy server. I have bought a subnet of IPs, and I want to make those IPs accessible to some paying customers. These are the base requirements I'm going for:
- 1 port to 1 IP, static connection - Done
- 1 port/port range to 1 or a few acl auth ips or user auth. - Problems here.
The issue is I'm trying to add the acl to each port individually, unfortunately squid is allowing any single acl access to all ports.
These are the relevant entries in my cfg file:
acl server_one_ip src 40.70.184.218
http_access allow server_one_ip
http_access deny all
http_port 3128 name=port_3128
http_port 3127 name=port_3127
acl port_3128_acl myportname port_3128
acl port_3127_acl myportname port_3127
always_direct deny port_3128_acl server_one_ip
always_direct deny port_3127_acl
never_direct allow port_3128_acl server_one_ip
never_direct allow port_3127_acl
cache_peer 207.202.217.26 parent 7823 0 proxy-only default name=proxy3128
cache_peer_access proxy3128 allow port_3128_acl server_one_ip
cache_peer_access proxy3128 deny all
cache_peer 207.202.211.170 parent 5991 0 proxy-only default name=proxy3127
cache_peer_access proxy3127 allow port_3127_acl
cache_peer_access proxy3127 deny all
So, to reiterate, everything else works fine. Each port keeps it's external routing static, the issue is I don't know how to add specific acl src
lists for each port.
My entire config file if it helps:
acl localnet src 10.0.0.0/8
acl localnet src 172.16.0.0/12
acl localnet src 192.168.0.0/16
acl localnet src fc00::/7
acl localnet src fe80::/10
acl server_one_ip src 40.70.184.218
acl SSL_ports port 443
acl Safe_ports port 80
acl Safe_ports port 21
acl Safe_ports port 443
acl Safe_ports port 70
acl Safe_ports port 210
acl Safe_ports port 1025-65535
acl Safe_ports port 280
acl Safe_ports port 488
acl Safe_ports port 591
acl Safe_ports port 777
acl CONNECT method CONNECT
http_access allow localhost manager
http_access deny manager
http_access deny !Safe_ports
http_access deny CONNECT !SSL_ports
http_access allow localnet
http_access allow localhost
http_access allow server_one_ip
http_access deny all
http_port 3128 name=port_3128
http_port 3127 name=port_3127
nonhierarchical_direct off
acl port_3128_acl myportname port_3128
acl port_3127_acl myportname port_3127
always_direct deny port_3128_acl server_one_ip
always_direct deny port_3127_acl
never_direct allow port_3128_acl server_one_ip
never_direct allow port_3127_acl
cache_peer 207.202.217.26 parent 7823 0 proxy-only default name=proxy3128
cache_peer_access proxy3128 allow port_3128_acl server_one_ip
cache_peer_access proxy3128 deny all
cache_peer 207.202.211.170 parent 5991 0 proxy-only default name=proxy3127
cache_peer_access proxy3127 allow port_3127_acl
cache_peer_access proxy3127 deny all
coredump_dir /var/cache/squid
refresh_pattern ^ftp: 1440 20% 10080
refresh_pattern ^gopher: 1440 0% 1440
refresh_pattern -i (/cgi-bin/|\?) 0 0% 0
refresh_pattern . 0 20% 4320
dns_nameservers 8.8.8.8 208.67.222.222
max_filedescriptors 3200