squid/install.sh

raw link view readme
1 yum install firewalld -y
2 systemctl start firewalld
3 systemctl enable firewalld
4 firewall-cmd --permanent --add-interface=eth0 --zone=public
5 firewall-cmd --permanent --add-service=squid --zone=public
6 firewall-cmd --reload
7
8 yum install squid -y
9
10 sed -i.original "/acl localnet src 172.*/d" /etc/squid/squid.conf
11 sed -i "/acl localnet src 192.*/d" /etc/squid/squid.conf
12 sed -i "/acl localnet src fc00.*/d" /etc/squid/squid.conf
13 sed -i "/acl localnet src fe80.*/d" /etc/squid/squid.conf
14 sed -i "/^#/d;/^$/d" /etc/squid/squid.conf
15
16 systemctl start squid
17 systemctl enable squid
18
19 # squid -k reconfigure
20