[‘
It’s not only to System Administrator and Network Administrator, who listens the phrase Proxy Server every now and then but we too. Proxy Server is now a corporate culture and is the need of the hour. Proxy server now a days is implemented from small schools, cafeteria to large MNCs. Squid (also known as proxy) is such an application which acts as proxy server and one of the most widely used tool of its kind.
n
This Interview article aims at strengthening your base from Interview point on the ground of proxy server and squid.
n

n
1. What do you mean by Proxy Server? What is the use of Proxy Server in Computer Networks?
n
n
Proxy servers are the backbone of WWW (World Wide Web). Most of the proxies of today are web proxies. A proxy server handles the complexity in between the Communication of client and Server. Moreover it provides anonymity on the web which simply means your identity and digital footprints are safe. Proxies can be configured to allow which sites client can see and which sites are blocked.
n
2. What is Squid?
n
n
3. What is the default port of squid and how to change its operating port?
n
n
Open ‘/etc/squid/squid.conf’ file and with your choice of editor.
n
# nano /etc/squid/squid.conf
n
Now change this port to any other unused port. Save the editor and exit.
n
http_port 3128
n
Restart the squid service as shown below.
n
# service squid restart
n
4. You works for a company the management of which ask you to block certain domains through squid proxy server. What are you going to do?
n
n
a. Create a file say ‘blacklist’ under directory ‘/etc/squid’.
n
# touch /etc/squid/blacklist
n
b. Open the file ‘/etc/squid/blacklist’ with nano editor.
n
# nano /etc/squid/blacklist
n
c. Add all the domains to the file blacklist with one domain per line.
n
.facebook.comrn.twitter.comrn.gmail.comrn.yahoo.comrn...
n
d. Save the file and exit. Now open the Squid configuration file from location ‘/etc/squid/squid.conf’.
n
# nano /etc/squid/squid.conf
n
e. Add the lines below to the Squid configuration file.
n
acl BLACKLIST dstdom_regex -i “/etc/squid/blacklist”rnhttp_access deny blacklist
n
f. Save the configuration file and exit. Restart Squid service to make the changes effective.
n
# service squid restart
n
5. What is Media Range Limitation and partial download in Squid?
n
n
The squid’s feature of partial download is implemented well within windows update where downloads are requested in the form of small packets which can be paused. Because of this feature a update downloading windows machine can be restarted without any fear of data loss. Squid makes the Media Range Limitation and Partial Download possible only after storing a copy of whole data in it. Moreover the partial download gets deleted and not cached when user points to another page until Squid is specially configured somehow.
n
6. What is reverse proxy in squid?
n
n
Technically it is feasible to use single squid server to act both as normal proxy server and reverse proxy server at the same point of time.
n
7. Since Squid can be used as web-cache Daemon, is it possible to Clear its Cache? How?
n
n
a. First stop Squid proxy server and delete cache from the location ‘/var/lib/squid/cache’ directory.
n
# service squid stoprn# rm -rf /var/lib/squid/cache/*<
n
b. Create Swap directories.
n
# squid -z
n
8. A client approaches you, who is working. They want the web access time be restricted for their children. How will you achieve this scenario?
n
Say the web access allow time be 4’o clock to 7’o clock in the evening for three hours, sharply form Monday to Friday.
n
a. To restrict web access between 4 to 7 from Monday to Friday, open the Squid configuration file.
n
# nano /etc/squid/squid.conf
n
b. Add the following lines and save the file and exit.
n
acl ALLOW_TIME time M T W H F 16:00-19:00rnshttp_access allow ALLOW_TIME
n
c. Restart the Squid Service.
n
# service squid restart
n
9. Squid stores data in which file format?
n
n
10. Where do cache gets stored by squid?
n
n
That’s all for now. I’ll be here again with another interesting article soon. Till then stay tuned and connected to Tecmint. Don’t forget to provide us with your valuable feedback the comment section below.
n
‘]