{"id":15637,"date":"2025-11-07T11:25:56","date_gmt":"2025-11-07T11:25:56","guid":{"rendered":"https:\/\/greenwebpage.com\/community\/?p=15637"},"modified":"2025-11-15T05:32:35","modified_gmt":"2025-11-15T05:32:35","slug":"how-to-configure-proxy-settings-on-centos-10","status":"publish","type":"post","link":"https:\/\/greenwebpage.com\/community\/how-to-configure-proxy-settings-on-centos-10\/","title":{"rendered":"How to Configure Proxy Settings on CentOS 10"},"content":{"rendered":"\n<p>CentOS 10 requires that you configure proxy settings if your system is behind a firewall or corporate network that restricts direct internet access. Properly configured proxy settings ensure that your server can securely connect to external repositories, update packages, and access web resources. This tutorial can help you set up a secure and reliable proxy connection, whether you manage a single server in an enterprise network or a single machine.<\/p>\n\n\n\n<p>This guide will show you how to configure CentOS 10 proxy settings step-by-step. It includes setting up global variables, configuring YUM\/DNF for package management, and applying proxy rules for curl and wget.<\/p>\n\n\n\n<p><strong>Table of Contents<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><a href=\"#Why-Configure-a-Proxy\">Why Configure a Proxy?<\/a><\/li>\n\n\n\n<li><a href=\"#Step-by-Step:-Configure-Proxy-Settings-on-CentOS-10\">How to Configure Proxy Settings on CentOS 10<\/a>\n<ul class=\"wp-block-list\">\n<li><a href=\"#Step-1:-Set-Proxy-as-Environment-Variables-(System-Wide)\">Step 1: Set Proxy as Environment Variables <\/a><\/li>\n\n\n\n<li><a href=\"#Step-2:-Configure-Proxy-for-DNF-YUM-Package-Manager\">Step 2: Configure Proxy for DNF\/YUM Package Manager<\/a><\/li>\n\n\n\n<li><a href=\"#Step-3:-Configure-Proxy-for-Wget-and-Curl\">Step 3: Configure Proxy for Wget and Curl<\/a><\/li>\n\n\n\n<li><a href=\"#Step-4:-Configure-Proxy-for-Systemd-Services-(Optional)\">Step 4: Configure Proxy for Systemd Services <\/a><\/li>\n\n\n\n<li><a href=\"#Step-5:-Bypass-Proxy-for-Local-Networks\">Step 5: Bypass Proxy for Local Networks<\/a><\/li>\n\n\n\n<li><a href=\"#Step-6:-Verify-Proxy-Configuration\">Step 6: Verify Proxy Configuration<\/a><\/li>\n<\/ul>\n<\/li>\n\n\n\n<li><a href=\"#Troubleshooting-Tips\">Troubleshooting Tips<\/a><\/li>\n\n\n\n<li><a href=\"#Conclusion\">Conclusion<\/a><\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"Why-Configure-a-Proxy\"><a id=\"post-15637-_p59vrorg7nm6\"><\/a>Why Configure a Proxy?<\/h2>\n\n\n\n<p>CentOS 10&#8217;s proxy settings ensure that your system, tools, and applications can securely access the Internet. This is especially important in restricted or enterprise environments. Setting environment variables, updating the DNF\/YUM settings, and applying settings for applications and services will make your system proxy-ready.<\/p>\n\n\n\n<p>A proxy is a mediator between your computer and the Internet. A proxy server is useful for:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Control and monitor internet traffic.<\/li>\n\n\n\n<li>Filtering traffic can improve security.<\/li>\n\n\n\n<li>You can bypass network restrictions and internal firewalls.<\/li>\n\n\n\n<li>Download updates from servers in private networks. <\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"Step-by-Step:-Configure-Proxy-Settings-on-CentOS-10\"><a id=\"post-15637-_yqzwaait3537\"><\/a>Step-by-Step: Configure Proxy Settings on CentOS 10<\/h2>\n\n\n\n<p>You&#8217;ll need to configure your proxy settings if you want to use a proxy to monitor and secure traffic on CentOS 10 servers. Misconfigured proxy settings can cause updates to be blocked, package downloads to fail, and errors with tools such as curl or wget.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"Step-1:-Set-Proxy-as-Environment-Variables-(System-Wide)\"><a id=\"post-15637-_xi7nq0m5ama9\"><\/a>Step 1: Set Proxy as Environment Variables (System-Wide)<\/h3>\n\n\n\n<p>Environment variables are used by most Linux applications to read proxy information. By setting them globally, all users and applications can access the Internet through the proxy.<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><thead><tr><th>\n<p>sudo nano \/etc\/profile.d\/proxy.sh<\/p>\n<\/th><\/tr><\/thead><\/table><\/figure>\n\n\n\n<p><strong>Add the following lines:<\/strong><\/p>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><thead><tr><th>\n<p>export http_proxy=&#8221;http:\/\/proxy.example.com:8080&#8243;<\/p>\n<p>export https_proxy=&#8221;http:\/\/proxy.example.com:8080&#8243;<\/p>\n<p>export ftp_proxy=&#8221;http:\/\/proxy.example.com:8080&#8243;<\/p>\n<p>export no_proxy=&#8221;localhost,127.0.0.1,.example.local&#8221;<\/p>\n<p>export HTTP_PROXY=&#8221;$http_proxy&#8221;<\/p>\n<p>export HTTPS_PROXY=&#8221;$https_proxy&#8221;<\/p>\n<p>export FTP_PROXY=&#8221;$ftp_proxy&#8221;<\/p>\n<p>export NO_PROXY=&#8221;$no_proxy&#8221;<\/p>\n<\/th><\/tr><\/thead><\/table><\/figure>\n\n\n\n<figure class=\"wp-block-image\"><img fetchpriority=\"high\" decoding=\"async\" width=\"1082\" height=\"541\" src=\"http:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2025\/11\/word-image-15637-1.png\" alt=\"Set proxy as environment variables\" class=\"wp-image-15638\" srcset=\"https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2025\/11\/word-image-15637-1.png 1082w, https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2025\/11\/word-image-15637-1-300x150.png 300w, https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2025\/11\/word-image-15637-1-1024x512.png 1024w, https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2025\/11\/word-image-15637-1-768x384.png 768w\" sizes=\"(max-width: 1082px) 100vw, 1082px\" \/><\/figure>\n\n\n\n<p><\/p>\n\n\n\n<p><strong>Explanation:<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>The http_proxy or https_proxy specifies your proxy address.<\/li>\n\n\n\n<li>No_proxy specifies local domains and IPs that should bypass the proxy.<\/li>\n\n\n\n<li>Save this file in \/etc\/profile.d\/ to apply the settings system-wide.<\/li>\n<\/ul>\n\n\n\n<p><strong>Apply the configuration immediately:<\/strong><\/p>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><thead><tr><th>\n<p>source \/etc\/profile.d\/proxy.sh<\/p>\n<\/th><\/tr><\/thead><\/table><\/figure>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" width=\"1077\" height=\"136\" src=\"http:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2025\/11\/word-image-15637-2.png\" alt=\"source \/etc\/profile.d\/proxy.sh\" class=\"wp-image-15639\" srcset=\"https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2025\/11\/word-image-15637-2.png 1077w, https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2025\/11\/word-image-15637-2-300x38.png 300w, https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2025\/11\/word-image-15637-2-1024x129.png 1024w, https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2025\/11\/word-image-15637-2-768x97.png 768w\" sizes=\"(max-width: 1077px) 100vw, 1077px\" \/><\/figure>\n\n\n\n<p><\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"Step-2:-Configure-Proxy-for-DNF-YUM-Package-Manager\"><a id=\"post-15637-_6ticuaua4ykb\"><\/a>Step 2: Configure Proxy for DNF\/YUM Package Manager<\/h3>\n\n\n\n<p>CentOS 10&#8217;s default package manager is DNF. The package downloads require explicit proxy configuration.<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><thead><tr><th>\n<p>sudo nano \/etc\/dnf\/dnf.conf<\/p>\n<\/th><\/tr><\/thead><\/table><\/figure>\n\n\n\n<p><strong>Add the following to the [main] section:<\/strong><\/p>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><thead><tr><th>\n<p>proxy=http:\/\/proxy.example.com:8080<\/p>\n<p># proxy_username=yourusername<\/p>\n<p># proxy_password=yourpassword<\/p>\n<\/th><\/tr><\/thead><\/table><\/figure>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" width=\"1071\" height=\"534\" src=\"http:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2025\/11\/word-image-15637-3.png\" alt=\"Configure Proxy for DNF\/YUM Package Manager\" class=\"wp-image-15640\" srcset=\"https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2025\/11\/word-image-15637-3.png 1071w, https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2025\/11\/word-image-15637-3-300x150.png 300w, https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2025\/11\/word-image-15637-3-1024x511.png 1024w, https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2025\/11\/word-image-15637-3-768x383.png 768w\" sizes=\"(max-width: 1071px) 100vw, 1071px\" \/><\/figure>\n\n\n\n<p><\/p>\n\n\n\n<p><strong>Explanation:<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>All DNF operations, such as dnf installation or dnf updates, will use the proxy server.<\/li>\n\n\n\n<li>If you require authentication for your proxy, remove the comment and enter proxy_username\/proxy_password.<\/li>\n<\/ul>\n\n\n\n<p><strong>Test it:<\/strong><\/p>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><thead><tr><th>\n<p>sudo dnf update<\/p>\n<\/th><\/tr><\/thead><\/table><\/figure>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"1067\" height=\"520\" src=\"http:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2025\/11\/word-image-15637-4.png\" alt=\"sudo dnf update\" class=\"wp-image-15641\" srcset=\"https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2025\/11\/word-image-15637-4.png 1067w, https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2025\/11\/word-image-15637-4-300x146.png 300w, https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2025\/11\/word-image-15637-4-1024x499.png 1024w, https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2025\/11\/word-image-15637-4-768x374.png 768w\" sizes=\"(max-width: 1067px) 100vw, 1067px\" \/><\/figure>\n\n\n\n<p><\/p>\n\n\n\n<p>Your DNF proxy configuration is correct if the update succeeds.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"Step-3:-Configure-Proxy-for-Wget-and-Curl\"><a id=\"post-15637-_q7y8zmprd1qy\"><\/a>Step 3: Configure Proxy for Wget and Curl<\/h3>\n\n\n\n<p>Some command-line utilities, such as wget or curl, use their configuration files.<\/p>\n\n\n\n<p><strong>For wget:<\/strong><\/p>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><thead><tr><th>\n<p>sudo nano \/etc\/wgetrc<\/p>\n<\/th><\/tr><\/thead><\/table><\/figure>\n\n\n\n<p><strong>Add:<\/strong><\/p>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><thead><tr><th>\n<p>http_proxy = http:\/\/proxy.example.com:8080\/<\/p>\n<p>https_proxy = http:\/\/proxy.example.com:8080\/<\/p>\n<p>no_proxy = localhost,127.0.0.1<\/p>\n<\/th><\/tr><\/thead><\/table><\/figure>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"1074\" height=\"641\" src=\"http:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2025\/11\/word-image-15637-5.png\" alt=\"Configure Proxy for Wget and Curl\" class=\"wp-image-15642\" srcset=\"https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2025\/11\/word-image-15637-5.png 1074w, https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2025\/11\/word-image-15637-5-300x179.png 300w, https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2025\/11\/word-image-15637-5-1024x611.png 1024w, https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2025\/11\/word-image-15637-5-768x458.png 768w\" sizes=\"(max-width: 1074px) 100vw, 1074px\" \/><\/figure>\n\n\n\n<p><\/p>\n\n\n\n<p><strong>For curl:<br><\/strong> You can specify the variables directly or use environment variables.<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><thead><tr><th>\n<p>curl -x http:\/\/proxy.example.com:8080 https:\/\/example.com<\/p>\n<\/th><\/tr><\/thead><\/table><\/figure>\n\n\n\n<p><strong>Explanation:<br><\/strong> The proxy settings will ensure that your commands connect to URLs through the proxy instead of directly.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"Step-4:-Configure-Proxy-for-Systemd-Services-(Optional)\"><a id=\"post-15637-_9ziec7b1qi5y\"><\/a>Step 4: Configure Proxy for Systemd Services (Optional)<\/h3>\n\n\n\n<p>Create a configuration file to allow services managed by Systemd (such as Docker, Nginx, or others) to use the proxy.<\/p>\n\n\n\n<p><strong>Example for Docker:<\/strong><\/p>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><thead><tr><th>\n<p>sudo mkdir -p \/etc\/systemd\/system\/docker.service.d<\/p>\n<p>sudo nano \/etc\/systemd\/system\/docker.service.d\/http-proxy.conf<\/p>\n<\/th><\/tr><\/thead><\/table><\/figure>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"1070\" height=\"157\" src=\"http:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2025\/11\/word-image-15637-6.png\" alt=\"Configure Proxy for Systemd Services\" class=\"wp-image-15643\" srcset=\"https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2025\/11\/word-image-15637-6.png 1070w, https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2025\/11\/word-image-15637-6-300x44.png 300w, https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2025\/11\/word-image-15637-6-1024x150.png 1024w, https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2025\/11\/word-image-15637-6-768x113.png 768w\" sizes=\"(max-width: 1070px) 100vw, 1070px\" \/><\/figure>\n\n\n\n<p><\/p>\n\n\n\n<p><strong>Add:<\/strong><\/p>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><thead><tr><th>\n<p>[Service]<\/p>\n<p>Environment=&#8221;HTTP_PROXY=http:\/\/proxy.example.com:8080\/&#8221;<\/p>\n<p>Environment=&#8221;HTTPS_PROXY=http:\/\/proxy.example.com:8080\/&#8221;<\/p>\n<p>Environment=&#8221;NO_PROXY=localhost,127.0.0.1&#8243;<\/p>\n<\/th><\/tr><\/thead><\/table><\/figure>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"1075\" height=\"588\" src=\"http:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2025\/11\/word-image-15637-7.png\" alt=\"Configure Proxy for Systemd Services\" class=\"wp-image-15644\" srcset=\"https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2025\/11\/word-image-15637-7.png 1075w, https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2025\/11\/word-image-15637-7-300x164.png 300w, https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2025\/11\/word-image-15637-7-1024x560.png 1024w, https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2025\/11\/word-image-15637-7-768x420.png 768w\" sizes=\"(max-width: 1075px) 100vw, 1075px\" \/><\/figure>\n\n\n\n<p><\/p>\n\n\n\n<p><strong>Apply the changes:<\/strong><\/p>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><thead><tr><th>\n<p>sudo systemctl daemon-reexec<\/p>\n<p>sudo systemctl daemon-reload<\/p>\n<p>sudo systemctl restart docker<\/p>\n<\/th><\/tr><\/thead><\/table><\/figure>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"1070\" height=\"232\" src=\"http:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2025\/11\/word-image-15637-8.png\" alt=\"Apply changes after configuring proxy settings for systemd services\" class=\"wp-image-15645\" srcset=\"https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2025\/11\/word-image-15637-8.png 1070w, https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2025\/11\/word-image-15637-8-300x65.png 300w, https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2025\/11\/word-image-15637-8-1024x222.png 1024w, https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2025\/11\/word-image-15637-8-768x167.png 768w\" sizes=\"(max-width: 1070px) 100vw, 1070px\" \/><\/figure>\n\n\n\n<p><\/p>\n\n\n\n<p><strong>Explanation:<br><\/strong> Systemd overrides make sure background services inherit proxy values at startup.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"Step-5:-Bypass-Proxy-for-Local-Networks\"><a id=\"post-15637-_9i1xjs92kvpc\"><\/a>Step 5: Bypass Proxy for Local Networks<\/h3>\n\n\n\n<p>Local traffic (like localhost and internal domains) may not be routed through the proxy.<\/p>\n\n\n\n<p><strong>Add exceptions to no_proxy:<\/strong><\/p>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><thead><tr><th>\n<p>export no_proxy=&#8221;localhost,127.0.0.1,.internaldomain.com&#8221;<\/p>\n<\/th><\/tr><\/thead><\/table><\/figure>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"1076\" height=\"99\" src=\"http:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2025\/11\/word-image-15637-9.png\" alt=\"export no_proxy=&quot;localhost,127.0.0.1,.internaldomain.com&quot;\" class=\"wp-image-15646\" srcset=\"https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2025\/11\/word-image-15637-9.png 1076w, https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2025\/11\/word-image-15637-9-300x28.png 300w, https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2025\/11\/word-image-15637-9-1024x94.png 1024w, https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2025\/11\/word-image-15637-9-768x71.png 768w\" sizes=\"(max-width: 1076px) 100vw, 1076px\" \/><\/figure>\n\n\n\n<p><\/p>\n\n\n\n<p><strong>Explanation:<br><\/strong> It improves speed and reliability by preventing unnecessary proxy routing of local or intranet addresses.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"Step-6:-Verify-Proxy-Configuration\"><a id=\"post-15637-_cla77v3698li\"><\/a>Step 6: Verify Proxy Configuration<\/h3>\n\n\n\n<p>The following will allow you to verify the proxy configuration.<\/p>\n\n\n\n<p><strong>Check environment variables:<\/strong><\/p>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><thead><tr><th>\n<p>env | grep -i proxy<\/p>\n<\/th><\/tr><\/thead><\/table><\/figure>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"1069\" height=\"351\" src=\"http:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2025\/11\/word-image-15637-10.png\" alt=\"env | grep -i proxy\" class=\"wp-image-15647\" srcset=\"https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2025\/11\/word-image-15637-10.png 1069w, https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2025\/11\/word-image-15637-10-300x99.png 300w, https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2025\/11\/word-image-15637-10-1024x336.png 1024w, https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2025\/11\/word-image-15637-10-768x252.png 768w\" sizes=\"(max-width: 1069px) 100vw, 1069px\" \/><\/figure>\n\n\n\n<p><\/p>\n\n\n\n<p><strong>Test internet access:<\/strong><\/p>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><thead><tr><th>\n<p>curl -I https:\/\/www.google.com<\/p>\n<\/th><\/tr><\/thead><\/table><\/figure>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"1120\" height=\"585\" src=\"http:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2025\/11\/word-image-15637-11.png\" alt=\"curl -I https:\/\/www.google.com\" class=\"wp-image-15648\" srcset=\"https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2025\/11\/word-image-15637-11.png 1120w, https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2025\/11\/word-image-15637-11-300x157.png 300w, https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2025\/11\/word-image-15637-11-1024x535.png 1024w, https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2025\/11\/word-image-15637-11-768x401.png 768w\" sizes=\"(max-width: 1120px) 100vw, 1120px\" \/><\/figure>\n\n\n\n<p><\/p>\n\n\n\n<p><strong>Explanation:<br><\/strong> If you get a valid HTTP reply (like 200 OK), then your proxy has been configured correctly.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"Troubleshooting-Tips\"><a id=\"post-15637-_o5re7qgz81zg\"><\/a>Troubleshooting Tips<\/h2>\n\n\n\n<ul class=\"wp-block-list\">\n<li>If you receive Error 40 (Proxy authentication required), please check your username and password in the proxy URL.<\/li>\n\n\n\n<li>Timeouts and No Connection: Check that your proxy IP address and port number are correct and that the firewall is not blocking the connection.<\/li>\n\n\n\n<li>Check for typos in \/etc\/dnf\/dnf.conf if DNF does not work.<\/li>\n\n\n\n<li>If the changes do not apply, re-source your environment or restart the service by using systemctl start. <\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"Conclusion\"><a id=\"post-15637-_t70pfj4fsmvg\"><\/a>Conclusion<\/h2>\n\n\n\n<p>To configure proxy settings on CentOS 10, open the terminal and create a new file using sudo nano \/etc\/profile.d\/proxy.sh, then add your proxy details such as export http_proxy=&#8221;http:\/\/proxy.example.com:8080&#8243; and export https_proxy=&#8221;http:\/\/proxy.example.com:8080&#8243;, including no_proxy for local addresses. Save the file and apply the changes with source \/etc\/profile.d\/proxy.sh.<\/p>\n\n\n\n<p>Next, edit the DNF configuration file using sudo vi \/etc\/dnf\/dnf.conf and add proxy=http:\/\/proxy.example.com:8080 under the [main] section to enable package manager access through the proxy. Finally, test the configuration by running curl -I https:\/\/www.google.com or sudo dnf update to verify that your CentOS 10 system is successfully connected through the configured proxy.<\/p>\n\n\n\n<p><\/p>\n\n    <div class=\"xs_social_share_widget xs_share_url after_content \t\tmain_content  wslu-style-1 wslu-share-box-shaped wslu-fill-colored wslu-none wslu-share-horizontal wslu-theme-font-no wslu-main_content\">\n\n\t\t\n        <ul>\n\t\t\t        <\/ul>\n    <\/div> \n","protected":false},"excerpt":{"rendered":"<p>CentOS 10 requires that you configure proxy settings if your system is behind a firewall or corporate network that restricts direct internet access. Properly configured proxy settings ensure that your server can securely connect to external repositories, update packages, and access web resources. This tutorial can help you set up a secure and reliable proxy [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":15727,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[43],"tags":[958,972],"class_list":["post-15637","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-tutorials","tag-centos-10","tag-proxy-settings"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v26.5 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>How to Configure Proxy Settings on CentOS 10 - Greenwebpage Community<\/title>\n<meta name=\"description\" content=\"This guide will show you how to configure CentOS 10 stream proxy settings step-by-step. Learn more in this article.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/greenwebpage.com\/community\/how-to-configure-proxy-settings-on-centos-10\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"How to Configure Proxy Settings on CentOS 10 - Greenwebpage Community\" \/>\n<meta property=\"og:description\" content=\"This guide will show you how to configure CentOS 10 stream proxy settings step-by-step. Learn more in this article.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/greenwebpage.com\/community\/how-to-configure-proxy-settings-on-centos-10\/\" \/>\n<meta property=\"og:site_name\" content=\"Greenwebpage Community\" \/>\n<meta property=\"article:published_time\" content=\"2025-11-07T11:25:56+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2025-11-15T05:32:35+00:00\" \/>\n<meta property=\"og:image\" content=\"http:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2025\/11\/Configure-Proxy-Settings-on-CENTOS-10-1.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"1071\" \/>\n\t<meta property=\"og:image:height\" content=\"600\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"Karim Buzdar\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Karim Buzdar\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"7 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/greenwebpage.com\/community\/how-to-configure-proxy-settings-on-centos-10\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/greenwebpage.com\/community\/how-to-configure-proxy-settings-on-centos-10\/\"},\"author\":{\"name\":\"Karim Buzdar\",\"@id\":\"https:\/\/greenwebpage.com\/community\/#\/schema\/person\/467c100c1d017bc081473ee0440680c8\"},\"headline\":\"How to Configure Proxy Settings on CentOS 10\",\"datePublished\":\"2025-11-07T11:25:56+00:00\",\"dateModified\":\"2025-11-15T05:32:35+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/greenwebpage.com\/community\/how-to-configure-proxy-settings-on-centos-10\/\"},\"wordCount\":1001,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/greenwebpage.com\/community\/#organization\"},\"image\":{\"@id\":\"https:\/\/greenwebpage.com\/community\/how-to-configure-proxy-settings-on-centos-10\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2025\/11\/Configure-Proxy-Settings-on-CENTOS-10-1.jpg\",\"keywords\":[\"CentOS 10\",\"Proxy Settings\"],\"articleSection\":[\"Tutorials\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/greenwebpage.com\/community\/how-to-configure-proxy-settings-on-centos-10\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/greenwebpage.com\/community\/how-to-configure-proxy-settings-on-centos-10\/\",\"url\":\"https:\/\/greenwebpage.com\/community\/how-to-configure-proxy-settings-on-centos-10\/\",\"name\":\"How to Configure Proxy Settings on CentOS 10 - Greenwebpage Community\",\"isPartOf\":{\"@id\":\"https:\/\/greenwebpage.com\/community\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/greenwebpage.com\/community\/how-to-configure-proxy-settings-on-centos-10\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/greenwebpage.com\/community\/how-to-configure-proxy-settings-on-centos-10\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2025\/11\/Configure-Proxy-Settings-on-CENTOS-10-1.jpg\",\"datePublished\":\"2025-11-07T11:25:56+00:00\",\"dateModified\":\"2025-11-15T05:32:35+00:00\",\"description\":\"This guide will show you how to configure CentOS 10 stream proxy settings step-by-step. Learn more in this article.\",\"breadcrumb\":{\"@id\":\"https:\/\/greenwebpage.com\/community\/how-to-configure-proxy-settings-on-centos-10\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/greenwebpage.com\/community\/how-to-configure-proxy-settings-on-centos-10\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/greenwebpage.com\/community\/how-to-configure-proxy-settings-on-centos-10\/#primaryimage\",\"url\":\"https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2025\/11\/Configure-Proxy-Settings-on-CENTOS-10-1.jpg\",\"contentUrl\":\"https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2025\/11\/Configure-Proxy-Settings-on-CENTOS-10-1.jpg\",\"width\":1071,\"height\":600,\"caption\":\"Configure Proxy Settings on CENTOS 10\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/greenwebpage.com\/community\/how-to-configure-proxy-settings-on-centos-10\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/greenwebpage.com\/community\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"How to Configure Proxy Settings on CentOS 10\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/greenwebpage.com\/community\/#website\",\"url\":\"https:\/\/greenwebpage.com\/community\/\",\"name\":\"Greenwebpage Community\",\"description\":\"Get online in three steps with our wide range of web hosting solutions. Choose from professional business to enterprise options designed to meet your needs.\",\"publisher\":{\"@id\":\"https:\/\/greenwebpage.com\/community\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/greenwebpage.com\/community\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/greenwebpage.com\/community\/#organization\",\"name\":\"Greenwebpage Community\",\"url\":\"https:\/\/greenwebpage.com\/community\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/greenwebpage.com\/community\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2023\/10\/cropped-logomic.png\",\"contentUrl\":\"https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2023\/10\/cropped-logomic.png\",\"width\":512,\"height\":512,\"caption\":\"Greenwebpage Community\"},\"image\":{\"@id\":\"https:\/\/greenwebpage.com\/community\/#\/schema\/logo\/image\/\"}},{\"@type\":\"Person\",\"@id\":\"https:\/\/greenwebpage.com\/community\/#\/schema\/person\/467c100c1d017bc081473ee0440680c8\",\"name\":\"Karim Buzdar\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/greenwebpage.com\/community\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/0628fcbcddd9bc5486245d2cf4a904dbcdeac9ad6c3098f49237094e9d513d0c?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/0628fcbcddd9bc5486245d2cf4a904dbcdeac9ad6c3098f49237094e9d513d0c?s=96&d=mm&r=g\",\"caption\":\"Karim Buzdar\"},\"sameAs\":[\"https:\/\/greenwebpage.com\"],\"url\":\"https:\/\/greenwebpage.com\/community\/author\/karim\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"How to Configure Proxy Settings on CentOS 10 - Greenwebpage Community","description":"This guide will show you how to configure CentOS 10 stream proxy settings step-by-step. Learn more in this article.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/greenwebpage.com\/community\/how-to-configure-proxy-settings-on-centos-10\/","og_locale":"en_US","og_type":"article","og_title":"How to Configure Proxy Settings on CentOS 10 - Greenwebpage Community","og_description":"This guide will show you how to configure CentOS 10 stream proxy settings step-by-step. Learn more in this article.","og_url":"https:\/\/greenwebpage.com\/community\/how-to-configure-proxy-settings-on-centos-10\/","og_site_name":"Greenwebpage Community","article_published_time":"2025-11-07T11:25:56+00:00","article_modified_time":"2025-11-15T05:32:35+00:00","og_image":[{"width":1071,"height":600,"url":"http:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2025\/11\/Configure-Proxy-Settings-on-CENTOS-10-1.jpg","type":"image\/jpeg"}],"author":"Karim Buzdar","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Karim Buzdar","Est. reading time":"7 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/greenwebpage.com\/community\/how-to-configure-proxy-settings-on-centos-10\/#article","isPartOf":{"@id":"https:\/\/greenwebpage.com\/community\/how-to-configure-proxy-settings-on-centos-10\/"},"author":{"name":"Karim Buzdar","@id":"https:\/\/greenwebpage.com\/community\/#\/schema\/person\/467c100c1d017bc081473ee0440680c8"},"headline":"How to Configure Proxy Settings on CentOS 10","datePublished":"2025-11-07T11:25:56+00:00","dateModified":"2025-11-15T05:32:35+00:00","mainEntityOfPage":{"@id":"https:\/\/greenwebpage.com\/community\/how-to-configure-proxy-settings-on-centos-10\/"},"wordCount":1001,"commentCount":0,"publisher":{"@id":"https:\/\/greenwebpage.com\/community\/#organization"},"image":{"@id":"https:\/\/greenwebpage.com\/community\/how-to-configure-proxy-settings-on-centos-10\/#primaryimage"},"thumbnailUrl":"https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2025\/11\/Configure-Proxy-Settings-on-CENTOS-10-1.jpg","keywords":["CentOS 10","Proxy Settings"],"articleSection":["Tutorials"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/greenwebpage.com\/community\/how-to-configure-proxy-settings-on-centos-10\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/greenwebpage.com\/community\/how-to-configure-proxy-settings-on-centos-10\/","url":"https:\/\/greenwebpage.com\/community\/how-to-configure-proxy-settings-on-centos-10\/","name":"How to Configure Proxy Settings on CentOS 10 - Greenwebpage Community","isPartOf":{"@id":"https:\/\/greenwebpage.com\/community\/#website"},"primaryImageOfPage":{"@id":"https:\/\/greenwebpage.com\/community\/how-to-configure-proxy-settings-on-centos-10\/#primaryimage"},"image":{"@id":"https:\/\/greenwebpage.com\/community\/how-to-configure-proxy-settings-on-centos-10\/#primaryimage"},"thumbnailUrl":"https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2025\/11\/Configure-Proxy-Settings-on-CENTOS-10-1.jpg","datePublished":"2025-11-07T11:25:56+00:00","dateModified":"2025-11-15T05:32:35+00:00","description":"This guide will show you how to configure CentOS 10 stream proxy settings step-by-step. Learn more in this article.","breadcrumb":{"@id":"https:\/\/greenwebpage.com\/community\/how-to-configure-proxy-settings-on-centos-10\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/greenwebpage.com\/community\/how-to-configure-proxy-settings-on-centos-10\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/greenwebpage.com\/community\/how-to-configure-proxy-settings-on-centos-10\/#primaryimage","url":"https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2025\/11\/Configure-Proxy-Settings-on-CENTOS-10-1.jpg","contentUrl":"https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2025\/11\/Configure-Proxy-Settings-on-CENTOS-10-1.jpg","width":1071,"height":600,"caption":"Configure Proxy Settings on CENTOS 10"},{"@type":"BreadcrumbList","@id":"https:\/\/greenwebpage.com\/community\/how-to-configure-proxy-settings-on-centos-10\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/greenwebpage.com\/community\/"},{"@type":"ListItem","position":2,"name":"How to Configure Proxy Settings on CentOS 10"}]},{"@type":"WebSite","@id":"https:\/\/greenwebpage.com\/community\/#website","url":"https:\/\/greenwebpage.com\/community\/","name":"Greenwebpage Community","description":"Get online in three steps with our wide range of web hosting solutions. Choose from professional business to enterprise options designed to meet your needs.","publisher":{"@id":"https:\/\/greenwebpage.com\/community\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/greenwebpage.com\/community\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/greenwebpage.com\/community\/#organization","name":"Greenwebpage Community","url":"https:\/\/greenwebpage.com\/community\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/greenwebpage.com\/community\/#\/schema\/logo\/image\/","url":"https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2023\/10\/cropped-logomic.png","contentUrl":"https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2023\/10\/cropped-logomic.png","width":512,"height":512,"caption":"Greenwebpage Community"},"image":{"@id":"https:\/\/greenwebpage.com\/community\/#\/schema\/logo\/image\/"}},{"@type":"Person","@id":"https:\/\/greenwebpage.com\/community\/#\/schema\/person\/467c100c1d017bc081473ee0440680c8","name":"Karim Buzdar","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/greenwebpage.com\/community\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/0628fcbcddd9bc5486245d2cf4a904dbcdeac9ad6c3098f49237094e9d513d0c?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/0628fcbcddd9bc5486245d2cf4a904dbcdeac9ad6c3098f49237094e9d513d0c?s=96&d=mm&r=g","caption":"Karim Buzdar"},"sameAs":["https:\/\/greenwebpage.com"],"url":"https:\/\/greenwebpage.com\/community\/author\/karim\/"}]}},"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/greenwebpage.com\/community\/wp-json\/wp\/v2\/posts\/15637","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/greenwebpage.com\/community\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/greenwebpage.com\/community\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/greenwebpage.com\/community\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/greenwebpage.com\/community\/wp-json\/wp\/v2\/comments?post=15637"}],"version-history":[{"count":3,"href":"https:\/\/greenwebpage.com\/community\/wp-json\/wp\/v2\/posts\/15637\/revisions"}],"predecessor-version":[{"id":15651,"href":"https:\/\/greenwebpage.com\/community\/wp-json\/wp\/v2\/posts\/15637\/revisions\/15651"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/greenwebpage.com\/community\/wp-json\/wp\/v2\/media\/15727"}],"wp:attachment":[{"href":"https:\/\/greenwebpage.com\/community\/wp-json\/wp\/v2\/media?parent=15637"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/greenwebpage.com\/community\/wp-json\/wp\/v2\/categories?post=15637"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/greenwebpage.com\/community\/wp-json\/wp\/v2\/tags?post=15637"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}