InterviewSolution
| 1. |
Write A Rule Allowing Only Selected Machines To Have Access To The Internet ? |
|
Answer» Edit the CONFIG FILE /etc/squid/squid.conf : acl allowed_clients src 192.168.1.10 192.168.1.20 192.168.1.30 http_access allow allowed_clients http_access deny !allowed_clients Above rule will allow only machine WHOSE IPS are 192.168.1.10,192.168.1.20 & 192.168.1.30 to have access to Internet and the REST of IP addresses (not listed ) are denied the service. After editing the file don’t forget to restart the squid service. Edit the config file /etc/squid/squid.conf : acl allowed_clients src 192.168.1.10 192.168.1.20 192.168.1.30 http_access allow allowed_clients http_access deny !allowed_clients Above rule will allow only machine whose IPs are 192.168.1.10,192.168.1.20 & 192.168.1.30 to have access to Internet and the rest of IP addresses (not listed ) are denied the service. After editing the file don’t forget to restart the squid service. |
|