squid.conf#
| squid.conf | Explanation | 
|---|---|
| http_port | port number | 
| visible_hostname | hostname | 
| hierarchy_stoplist | Character string that does not use cache | 
| maximum_object_size | Maximum cacheable size | 
| minimun_object_size | Minimum cacheable size | 
| maximum_object_size_in_memory | Maximum file size in memory | 
| ipcache_size | Number of IP addresses to cache | 
| cache_dir | Parameters such as directory and capacity to store the cache | 
| cache_mem | Cache size in memory | 
| cache_access_log | Client access log | 
| cache_log | Cache log | 
| ftp_user | Password for anonymous FTP access | 
| ftp_passive | FTP passive mode | 
| reference_age | Cache retention period | 
| request_header_max_size | Maximum size of HTTP request header | 
| request_body_max_size | Maximum size of HTTP request body | 
| reply_body_max_size | Maximum size of response | 
| acl | Access control list settings | 
| http_access | Access control list control | 
acl##
Perform an access control list on a set of hosts and protocols.
Format: acl ACL name ACL type string or file name
| ACL type | Explanation | 
|---|---|
| src | Client-side IP | 
| dst | IP of the surrogate access server | 
| srcdomain | Client domain name | 
| dstdomain | Domain name of the surrogate access server | 
| port | Proxy access server port number | 
| myport | Client port number | 
| arp | MAC address | 
| proto | protocol | 
| method | HTTP method | 
| time | Valid time | 
http_access##
Use http_access to control the access control list.
Format: http_access allow | deny ACL name
In the following example, access from 192.168.0.0/24 is prohibited.
squid.conf
acl test src 192.168.0.0/255.255.255.0
http_access deny test
On AWS, well, you could use a NAT gateway. .. ..
Allows clients to execute yum etc. via a proxy.
--Subnet --piblic-subnet (proxy server) --private-subnet (client)
--Security group
Describe the CIDR of the target IP address or subnet directly in the Squid configuration file.
squid.conf
acl private-subnet src <CIDR for private subnets>
http_access allow private-subnet
Describe the private IP address of the server you want to go through the proxy or CIDR of the subnet in /etc/squid/acl/whitelist.txt.
squid.conf
acl Whitelist dstdomain "/etc/squid/acl/Whitelist.txt"
http_access allow Whitelist
http_access deny all
/etc/yum.conf
proxy=http://<proxy private IP>:3128
/etc/wgetrc.
http_proxy=http://<proxy private IP>:3128
https_proxy=http://<proxy private IP>:3128
~/.curlrc
proxy=http://<proxy private IP>:3128
Summary of Apache Let's summarize Nginx
Recommended Posts