![]() Open the /etc/squid/nf file again: sudo vi /etc/squid/nfĤ. The dot specifies to block all subsites of the main site.ģ. In this file, add the websites to be blocked, starting with a dot: Create and edit a new text file /etc/squid/blocked.acl by entering: sudo vi /etc/squid/blocked.aclĢ. Any unauthenticated person will be stopped by an error message. Restart the proxy service and re-open your browser by inserting: systemctl restart squidĮdit the /etc/squid/nf file, and add the following command lines: auth_param basic program /usr/lib64/squid/basic_ncsa_auth /etc/squid/passwdĪuth_param basic realm Squid Basic Authenticationįrom now on when you connect to the Linux proxy server, you will see a prompt for your username and password. The system will prompt you to enter and confirm a password for ‘newuser.’ ![]() To create the password, use this command: htpasswd /etc/squid/passwd newuserĮxchange the ‘newuser ‘ with your user name. With the tool installed, create the new file: touch /etc/squid/passwd & chown squid /etc/squid/passwd Squid offers basic authentication alongside supporting other types of authentication.įirst, install httpd-tools with the following command: yum -y install httpd-tools To save changes, restart Squid: systemctl restart squid Set Up Proxy Authentication To open a specific port, add the following: acl Safe_ports port 123 # Custom port You can specify a range of IP address as follows: acl localnet src 192.166.0.10/30 Open Squid Proxy Ports acl localnet src 192.166.0.10 # test computer Text after the # sign is ignored by Squid. This will create a rule that only allows the system at this IP address to connect.Ĭomment the line to identify the rule. Add a new line as follows: acl localnet src 192.166.0.10 ![]() Note: After each of the following steps, you should save and exit, then restart the Squid service to apply the new configuration.Įdit the /etc/squid/nf file once again. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |