The default configuration file contains some configuration directives that needs to be configured to affect the behavior of the Squid. Now open this file for editing using Vi editor and make changes as shown below. Now, you may search about the following lines and change them as requested, in the Vi editor, you may search about those lines by hitting the ‘ESC’ and typing “ /” key to writing the specific lines to look for. http_port : This is the default port for the HTTP proxy server, by default it is 3128, you may change it to any other port that you want, you may also add the “transparent” tag to the end of the line like http_port 8888 transparent to make Squid proxy act like a transparent proxy if you want.http_access deny all : This line won’t let anybody to access the HTTP proxy server, that’s why you need to change it to http_access allow all to start using your Squid proxy server.visible_hostname : This directive is used to set the specific hostname to a squid server.$ sudo systemctl restart squidĬonfiguring Squid as an HTTP Proxy on Ubuntu You can give any hostname to squid.Īfter making above changes, you may restart the Squid proxy server using the command. In this squid configuration section, we will explain you how to configure squid as an HTTP proxy using only the client IP address for authentication. The acl rule you should add is: acl localnet src XX.XX.XX.XX If you wish to allow only one IP address to access the internet through your new proxy server, you will need to define new acl ( access control list) in the configuration file. Where XX.XX.XX.XX is the IP address of client machine. This acl should be added in the beginning of the ACL’s section as shown in the following screenshot. acl localnet src 192.168.0.102 # Boss IP address It is always a good practice to define a comment next to ACL which will describe who uses this IP address, for example. You will need to restart Squid service to take the new changes into effect. $ sudo systemctl restart squidīy default, only certain ports are allowed in the squid configuration, if you wish to add more just define them in the configuration file as shown. Where XXX is the port number that you wish to allow.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |