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)
- NETCONF & YANG: Automate Network Configs via Python - April 2, 2026
- Palo Alto – How to Configure Your Next-Generation Firewall - April 2, 2026
- How to Harden Linux SSH: Keys, Fail2ban & Ciphers - March 1, 2026
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:
Delta Practice Tests