RH302 · Question #113
Using squid block Internet to 192.168.1.0/24 Network and allow to 192.168.0.0/24 Network.
1. vi /etc/squid/squid.conf #default: http_port 8080 #Recommended minimum configuration: Near the src acl src section acl allownet src 192.1668.0.0/255.255.255.0 acl denynet src 192.168.1.0/255.255.255.0 #Default:# http_access deny all #Under Here http_access allow allownet…
Question
Explanation
- vi /etc/squid/squid.conf #default: http_port 8080 #Recommended minimum configuration:
Near the src acl src section
acl allownet src 192.1668.0.0/255.255.255.0 acl denynet src 192.168.1.0/255.255.255.0 #Default:# http_access deny all #Under Here http_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/Netmask After creating acl we can block or allow the internet to specified acl. http_access allow | deny alcname
Topics
Community Discussion
No community discussion yet for this question.