This documentation is for the extended support release (ESR) version of Cumulus Linux. We will continue to keep this content up to date until 21 February, 2023, when ESR support ends. For more information about ESR, please read this knowledge base article.

If you are using the current version of Cumulus Linux, the content on this page may not be up to date. The current version of the documentation is available here. If you are redirected to the main page of the user guide, then this page may have been renamed; please search for it there.

Configuring a Global Proxy

You configure global HTTP and HTTPS proxies in the /etc/profile.d/ directory of Cumulus Linux. To do so, set the http_proxy and https_proxy variables, which tells the switch the address of the proxy server to use to fetch URLs on the command line. This is useful for programs such as apt/apt-get, curl and wget, which can all use this proxy.

  1. In a terminal, create a new file in the /etc/profile.d/ directory. In the code example below, the file is called, and is created using the text editor nano.

    cumulus@switch:~$ sudo nano /etc/profile.d/
  2. Add a line to the file to configure either an HTTP or an HTTPS proxy, or both:

    • HTTP proxy:

        export http_proxy
    • HTTPS proxy:

        export https_proxy
  3. Create a file in the /etc/apt/apt.conf.d directory and add the following lines to the file for acquiring the HTTP and HTTPS proxies; the example below uses http_proxy as the file name:

    cumulus@switch:~$ sudo nano /etc/apt/apt.conf.d/http_proxy
    Acquire::http::Proxy "";
    Acquire::https::Proxy "";
  4. Add the proxy addresses to /etc/wgetrc; you may have to uncomment the http_proxy and https_proxy lines:

    cumulus@switch:~$ sudo nano /etc/wgetrc
    https_proxy =
    http_proxy =
  5. Run the source command, to execute the file in the current environment:

    cumulus@switch:~$ source /etc/profile.d/

The proxy is now configured. The echo command can be used to confirm a proxy is set up correctly:

  • HTTP proxy:

      cumulus@switch:~$ echo $http_proxy
  • HTTPS proxy:

      cumulus@switch:~$ echo $https_proxy
Set up an apt package cache