
Explore the Squid proxy server, its caching and access control features, and how to configure a lab with Windows and Linux clients to implement authentication and transparent proxy.
if you are facing issues regarding "yum" not working, please refer to lecture 38 for troubleshooting.
Configure firefox proxy settings on a linux c11 system to use squid at 172.24.0.1:3128, then set temporary and permanent proxies by exporting six environment variables including http_proxy via config file.
Configure proxy settings on the Windows Edge browser by enabling the open proxy settings, entering the proxy address 172.24.0.1 and port 3128, and saving to access pages.
Learn how squid proxy acl controls access by source, destination, and time, using http_access with named acls to allow or deny, and understand default localnet and wildcard mask concepts.
Modify squid.conf to replace the default localnet ACL with a new mynetwork ACL for source 172.24.0.0/16, then apply http_access rules and restart squid to verify access from clients.
Configure a squid proxy ACL named bbb to deny internet access for hosts from 172.24.0.11 to 172.24.0.21/32, then verify with targeted tests and restart the squid server.
Create an ACL named lab1 to deny the 172.24.0.0/16 network. Apply http_access deny lab1 and then allow all, and verify access on C11, C21, and C30.
Block websites by creating a destination domain acl (dstdomain) in squid, listing domains like .fb.com, linuxexpert.in, and .ca, then use http_access deny, http_access allow all, and verify across systems.
Create and verify a Squid acl named badwords with dstdom_regex to block sites containing words like adult and chat, using -i for case insensitivity, and deny while allowing others.
Create an acl badfiles in Squid using urlpath_regex with ignore case to block downloads of certain file types (exe, mov, iso, dat, avi), reducing bandwidth.
Demonstrate combining acl rules in squid to block specific file types for a single system using an aaa acl and badfiles, via http_access deny with an and condition.
Block access by mac address with an acl named maclist using arp, then http_access deny maclist and allow; you can combine acl types such as domain, src, urlpath, and time.
Learn how squid proxy server authentication restricts access to authenticated users using basic_ncsa_auth from /usr/lib64/squid/ and an httpd-style password file in /etc/squid/users, with squid.conf edits and user setup.
Configure squid proxy authentication for Aanya and Nanu, test access in Firefox and Edge, adjust CLI and Elinks settings, verify curl works, then revert to original configuration.
Configure transparent proxy with squid and iptables to redirect traffic without browser changes. Enable ip forwarding and set http_port 3128 in squid.conf, then configure NAT to route 80 to 3128.
Verify transparent proxy on linux gui client by removing proxy settings, configuring gateway 172.24.0.1 and dns servers 8.8.8.8 and 8.8.4.4, restarting network, and validating access to websites.
Remove proxy configurations from profile.d and Firefox, reboot to test in text mode, verify no proxy is set, access sites with elinks, and review environment and resolv.conf settings.
Configure gateway and DNS on Linux CLI, verify proxy settings with grep, restart the network service, and test access to secure sites to confirm the transparent proxy is functioning.
Verify transparent proxy on a Windows client by disabling browser proxy settings, configuring ipv4 172.24.0.1 and dns 8.8.8.8, and accessing sites without browser changes using squid with iptables.
Dismantle a transparent proxy by flushing NAT rules, resetting sysctl and squid settings, saving changes, and restarting network services on c21, c11, and c30 systems.
Perform post installation settings by disabling SELinux and the firewalld service, installing and enabling iptables, and configuring NAT for VM internet access. Configure a static IP via /etc/sysconfig/network-scripts/ifcfg-ens33.
learn to create a squid proxy server vm, clone it for a lab, configure two network interfaces, install squid and httpd-tools, and set static and dynamic IPs.
Clone a CentOS 7 machine to create C11 with gui by installing GNOME desktop, enabling graphical boot, and setting hostname to C11.example.com with a static IP 172.24.0.11 on bridged networking.
Clone a linux client vm as a full clone named c21, assign a static ip and hostname, bridge networking, reboot, and verify connectivity by pinging the server.
Test connectivity from Windows C30 by pinging 172.24.0.1 and verifying 172.24.0.30 with subnet 255.255.0.0 using ipconfig, in a lab with GUI mode and elinks.
Backup Current Repository Configuration:
First, make a backup of your current repository configuration files.
cp /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.bak
Edit the Repository Configuration:
Open the CentOS-Base.repo file in a text editor. (vi or nano)
nano /etc/yum.repos.d/CentOS-Base.repo
Update the Base Repository URLs:
Replace the existing base repository URLs with the URLs pointing to the CentOS Vault. The updated configuration should look something like this:
[base]
name=CentOS-$releasever - Base
baseurl=http://vault.centos.org/7.9.2009/os/$basearch/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7
[updates]
name=CentOS-$releasever - Updates
baseurl=http://vault.centos.org/7.9.2009/updates/$basearch/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7
[extras]
name=CentOS-$releasever - Extras
baseurl=http://vault.centos.org/7.9.2009/extras/$basearch/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7
Save the Changes:
Save the changes and exit the text editor (Ctrl+X, Y, Enter for nano).
Clean YUM Cache:
Clean the YUM cache to ensure it uses the updated repository configuration.
yum clean all
yum makecache
Update the System:
Now you can update your system using the Vault repositories.
yum update
This should allow you to continue using yum with the archived CentOS 7 repositories.
Squid proxy server is used for internet sharing. It is one of the most widely used, very robust and powerful server. It also provides access control (ACLs) and caching. It improves response time and reduces bandwidth usage.
* Squid Proxy Server Introduction
* How to configure Squid Proxy Server and setup clients
* How to use Access Control Lists (ACLs). Different types of acls
* How to control access on basis of source IP addresses, destination domains, words, day and time, MAC addresses etc.
* How to combine various types of ACLs to fine tune access.
* How to configure Squid Authentication. How to verify whether authentication is working properly or not.
* How to setup Transparent Proxy. Setting up transparent proxy involves combining squid and iptables. What are the different settings that needs to be configured. How to access transparent proxy. What are the settings that needs to be made on client systems.
* How to setup Squid Proxy Server Lab. Squid proxy server lab consists of 4 systems. One Linux system with 2 network interface cards will act as proxy server. One NIC will will be used to connect to internet and other will be used to connect to local area network. Remaining 3 systems (2 Linux and 1 Windows) will act as squid proxy clients.
* How to configure proxy server settings in different GUI based browsers.
* How to configure CLI proxy settings.