This documentation is for an older version of the software. If you are using the current version of Cumulus Linux, this content 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 variable, 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 proxy, and is created using the text editor vi.

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

    • HTTP proxy:

      export http_proxy
    • HTTPS proxy:

      export https_proxy
  3. 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