Answer: Do the following steps as:
1.vi /etc/squid/squid.conf
#detault:
http_port8080
#Recommended minimum configuration:
# Near the src acl src section
acl allownet src 192.168.0.0/255.255.255.0
acl denynet src 192.168.1.0/255.255.255.0
#Default:
# http_access deny all
#Under Herehttp_access allow allownet
http_access deny denynet
2.service squid start
3.chkconfig squid on
squid is a proxy caching server, using squid we can share the internet, block the internet, to certain network. First we should define the port for squid, the standard port for squid is 3128. We can run squid on different port by specifying http_port portnumber.
To block or allow the Internet access to hosts, we should create the acl (Access Control List). In this file we can specify only the IP address.
Example: acl aclname src IP/NetmaskAfter creating acl we can block or allow the internet to specified acl.
http_access allow | deny alcname
Submit