In order configure your Ubuntu/Debian box to access HTTP, HTTPS and FTP via a Proxy you will need to assign some environment variables.
Assign Environmental Variables
Below shows you the different variables you need to declare :
export HTTP_PROXY=[PROXY IP]:[PORT]
export HTTPS_PROXY=[PROXY IP]:[PORT]
export FTP_PROXY=[PROXY IP]:[PORT]
Survive reboot
To survive a reboot you need to add these to /etc/bash.bashrc
echo export HTTP_PROXY=http://[PROXY IP]:[PORT] >> /etc/bash.bashrc
echo export HTTPS_PROXY=https://[PROXY IP]:[PORT] >> /etc/bash.bashrc
echo export FTP_PROXY=ftp://[PROXY IP]:[PORT] >> /etc/bash.bashrc
User Authentication
Below is an example if you need to add authentication credentials:
HTTP_PROXY=http://[USERNAME]:[PASSWORD]@[PROXY IP]:[PORT]
Latest posts by Rick Donato (see all)
- How to Configure a BIND Server on Ubuntu - March 15, 2018
- What is a BGP Confederation? - March 6, 2018
- Cisco – What is BGP ORF (Outbound Route Filtering)? - March 5, 2018
Want to become a Linux expert?
Here is our hand-picked selection of the best courses you can find online:
Linux Mastery course
Linux Administration Bootcamp
and our recommended certification practice exams:
AlphaPrep Practice Tests - Free Trial