January 26, 201214 yr Ubuntu Proxy First edit sudo nano /etc/apt/apt.conf It's probably blank but if not replace with Acquire::http::proxy "http://domain\userid:password@proxyip:port/";[/code]Also edit sudo nano /etc/enivornment Add the following export http_proxy=http://domain\userid:password@proxyip:port/ export ftp_proxy=http://domain\userid:password@proxyip:port/ Finally you may as well edit sudo nano /etc/bash.bashrc Add to the end export http_proxy=http://domain\userid:password@proxyip:port/ export ftp_proxy=http://domain\userid:password@proxyip:port/
June 7, 201213 yr Author This has changed some with Ubuntu 12.x Now to setup apt-get to use a proxy, the settings are now found/created below sudo gedit /etc/apt/apt.conf.d/02proxy Note : 01proxy file is not present and 02proxy wasn't present either.Type the following line in the file: Acquire::http::Proxy “http://yourusername:yourpassword@yourproxy:yourport″;[/code]
May 9, 20179 yr A small issue when setting up proxy access for installing software (apt-get) or performing wget/curl operations through the proxies. This typically requires you to perform an export command as shown below. export https_proxy=http://username:password@10.60.0.19:80/ export http_proxy=http://username:password@10.60.0.19:80/ This command goes into your history and anyone that can access your history file or walks up to your pc when logging in and not locked to the jump box can dump your history and get your AD creds. I’ve been killing my entire history file when I needed to get rid of something in the history file I did not want others to see. I did some further reading and discovered there is a way to prevent a command from going into your history file. I have configured both jump boxes to allow the use of this methodology. Basically any time you place a space in front of a command it will not go into your history file. “ping 10.60.0.19” will go into your history file “ ping 10.60.0.19” will not go into your history file. You will need to sign out and back into the jumpbox to have this thing applied to your account as it is setup in a global shell script that all users run. Once you sign out and back in, you can use this technique. “ export https_proxy=http://username:password@10.60.0.19:80/” “ export http_proxy=http://username:password@10.60.0.19:80/” The above commands will not show in your history thereby hiding your creds from others. The first set in the beginning of the email will still go into your history file.
Create an account or sign in to comment