Centos - Network Gateway part 2 - Squid
Continue part1
a. Install
yum install -y squid*
yum install -y ntp*
ntpdate pool.ntp.org
Synchronize time between client and server
yum install -y httpd
Apache to test and base interface to manager
b. Basic Config
vim /etc/squid/squid.conf
http_port 8080
cache_mem 100 MB
Uncomment
cache_dir ufs ( type of store) /var/spool/squid 100 ( size) 16 ( Số thư mục con cấp 1) 255 ( số thư mục con cấp 2)
access_logs
:wq
grep -v "^#" /etc/squid/squid.conf | sed -e '/^$/d'
or : cat /etc/squid/squid.conf | sed '/ *#/d; /^ *$/d'
If you see another acl and http_access rule, delete it. we use only rule bellow to test
chkconfig squid --level 35 on
service squid start
c. Test: lsof -i :8080
d. Start Config
vim /etc/squid/squid.conf
acl my_network src 10.0.0.0/16
http_access allow my_network
http_access deny all
Restart and test
---------------------------------------------------------------------------
Thanks for reading
--------------------------------------------------------------------------
All my Lab:
Linux Lab -- window and Cisco Lab
to be continued - I will update more.
a. Install
yum install -y squid*
yum install -y ntp*
ntpdate pool.ntp.org
Synchronize time between client and server
yum install -y httpd
Apache to test and base interface to manager
b. Basic Config
vim /etc/squid/squid.conf
http_port 8080
cache_mem 100 MB
Uncomment
cache_dir ufs ( type of store) /var/spool/squid 100 ( size) 16 ( Số thư mục con cấp 1) 255 ( số thư mục con cấp 2)
access_logs
:wq
grep -v "^#" /etc/squid/squid.conf | sed -e '/^$/d'
or : cat /etc/squid/squid.conf | sed '/ *#/d; /^ *$/d'
If you see another acl and http_access rule, delete it. we use only rule bellow to test
chkconfig squid --level 35 on
service squid start
c. Test: lsof -i :8080
d. Start Config
vim /etc/squid/squid.conf
acl my_network src 10.0.0.0/16
http_access allow my_network
http_access deny all
Restart and test
---------------------------------------------------------------------------
Thanks for reading
--------------------------------------------------------------------------
All my Lab:
Linux Lab -- window and Cisco Lab
to be continued - I will update more.
Comments