Configure Jenkins Proxy with Squid for Domestic Plugin Access
This guide walks you through setting up a Squid proxy on Linux, configuring Jenkins to use the proxy, adding a domestic plugin repository, and adjusting firewall rules, enabling reliable network connectivity and plugin installation for Jenkins in environments with restricted internet access.
Deploy Squid Network Proxy
Install Squid on the host:
<code>$ sudo yum install squid -y</code>Configure Squid by adding an ACL for your local network in
/etc/squid/squid.conf:
<code>acl localnet src [your address range]</code>Tip: Append the above line under the existing
acl localnet srcsection.
Start Squid and enable it to run at boot:
<code>$ sudo systemctl enable squid --now</code>Open the Squid port (3128) in the firewall and reload the rules:
<code>$ sudo firewall-cmd --add-port=3128/tcp --permanent
$ sudo firewall-cmd --reload
$ sudo firewall-cmd --list-port</code>Configure Jenkins Network Proxy and Domestic Plugin Source
In Jenkins, navigate to Manage Jenkins → System and set up the HTTP proxy (see image).
Configure the proxy under HTTP Proxy Configuration → Setup (see image).
Set a domestic plugin repository using Huawei’s mirror:
<code>https://mirrors.huaweicloud.com/jenkins/updates/update-center.json</code>Tip: Use the above URL as the update site to speed up plugin downloads.
Open Manage Jenkins → Plugins and select the Advanced settings (see images).
Verify the configuration by checking Manage Jenkins → Plugins → Available plugins (see image).
Download and install the Role‑based Authorization Strategy plugin (see images).
Conclusion
By following these steps you can resolve network connectivity and plugin download issues in Jenkins, allowing you to focus on development and innovation. Proper tool configuration is half the battle, and Jenkins remains a powerful ally for automated build, test, and deployment pipelines.
Linux Ops Smart Journey
The operations journey never stops—pursuing excellence endlessly.
How this landed with the community
Was this worth your time?
0 Comments
Thoughtful readers leave field notes, pushback, and hard-won operational detail here.