[root@localhost ~]# yum install -y squid Loaded plugins: product-id, search-disabled-repos, subscription-manager This system is not registered with an entitlement server. You can use subscription-manager. Package 7:squid-3.5.20-12.el7.x86_64 already installed and latest version Nothing to do
2.编辑Squid的住配置文件,在合适的位置写入一下参数,开启透明代理服务
[root@localhost ~]# vim /etc/squid/squid.conf
55 # And finally deny all other access to this proxy 56 http_access deny all 57 58 # Squid normally listens to port 3128 59 http_port 192.168.1.10:3128 transparent #IP地址为网关(Squid)内网IP 60 visible_hostname www.lyshark.com #自定义主机名,随意 61 62 63 # Uncomment and adjust the following to add a disk cache directory. 64 #cache_dir ufs /var/spool/squid 100 16 256
[root@localhost ~]# yum install -y squid Loaded plugins: product-id, search-disabled-repos, subscription-manager This system is not registered with an entitlement server. You can use subscription-manager. Package 7:squid-3.5.20-12.el7.x86_64 already installed and latest version Nothing to do