[server]
-
Install packages
sudo apt-get install avahi-utils
sudo apt-get install squid-deb-proxy -
Edit Configuration
sudo vi /etc/squid-deb-proxy/allowed-networks-src.acl
Add LAN IP such as LAN IP is 192.168.1.0 - 192.168.1.255 :192.168.1.0/24
sudo vi /etc/squid-deb-proxy/mirror-dstdomain.acl
Add all repository from all client ( can see in file /etc/apt/source.list ) to configuration file :# default ubuntu and ubuntu country archive mirrors
.archive.ubuntu.com
ports.ubuntu.com
security.ubuntu.com
#official third party repositories
archive.canonical.com
extras.ubuntu.com
-
Restart service :
sudo service avahi-daemon restart sudo service squid-deb-proxy start
-
Check log file at :
sudo tail -f /var/log/squid-deb-proxy/access.log
[Client]
-
Install squid-deb-proxy-client
sudo apt-get install squid-deb-proxy-client
-
Check client con connect to proxy
avahi-browse -kprt _apt_proxy._tcp
+;eth2;IPv4;Squid\032deb\032proxy;_apt_proxy._tcp;local
=;eth2;IPv4;Squid\032deb\032proxy;_apt_proxy._tcp;local;squidserver.local;192.168.1.10;8000;
192.168.1.10 is squid-proxy-server
sudo vi /etc/apt/apt.conf.d/30autoproxyจากนั้นใส่เครื่องหมาย # ด้านหน้าบรรทัดแบบนี้
#Acquire::http { Proxy "http://192.168.1.10:8000/"; };
No comments:
Post a Comment