Posts

Showing posts from July, 2013

How to access internet from shell prompt in linux

Sometimes we need to access internet from the bash shell through proxy server such as Squid so this post is to explain how we can achieve this. Run below commands in shell to use proxy for http,https and ftp traffic. export http_proxy=http://192.168.1.1:3128 export https_proxy=http://192.168.1.1:3128 export ftp_proxy=http://192.168.1.1:3128 Now we can access internet from the shell prompt. For a particular user put this variables in /home/username/.bash_profile file. To setup the proxy environment variable as a global variable put this variables in /etc/profile file. For Yum we can set proxy setting in /etc/yum.conf file such as. proxy=http://192.168.1.1:3128 For RHN registration through proxy we need to configure /etc/sysconfig/rhn/up2date file with settings. enableProxy=1 httpProxy=192.168.1.9:3128