Showing posts with label Proxy. Show all posts
Showing posts with label Proxy. Show all posts

Saturday 20 May 2017

Step by Step method to Configure Proxy in Linux Terminal

Mostly Squid proxy wpad.dat file are used for configuring the browser on Linux operating system. If you required to configure the proxy on linux terminal then you need to use either DNS name of proxy internet or IP address with port.

Normally user facing such issue while they are working on Linux environment and trying to download files on Linux terminal but they are facing a download error. This is because terminal never accept the browser settings. So you need to set the parameter of proxy manually on linux terminal window.

Here, we will discuss several ways using which we can configure the proxy on linux terminal window. Using this method you can configure the proxy on any linux environment like CentOS, Ubuntu etc.

Step by Step method to configure the proxy in Linux:

In mostly companies when you work on linux server, and trying to download files you will get an error " proxy behind the firewall" that's means you need to configure the proxy on terminal so that when you run your application or command to download the data such error not occur.

➤ Let's suppose your Proxy IP address is 10.13.2.34 and port is 8080, then you need to run the below command into the linux terminal.

[root@localhost]# export http_proxy=http://10.13.2.34:8080

and if your proxy server is secure then you can used https tag with export settings. Please find the below command syntax to use proxy with https.

[root@localhost]# export https_proxy=https://10.13.2.34:8080

➤ Let's suppose your Proxy IP address resolve a particular domain name then in this case you can change the IP address name with dns name as given in below example.

[root@localhost]# export http_proxy=http://squid.proxy.com:8080

[root@localhost]# export https_proxy=https://squid.proxy.com:8080

Please change your dns name as per your proxy configuration, in my case i just take a dummy dns name.

➤ Let's suppose you want to make the export settings permanently for all Unix system users, so any user if login on the Linux server they can able to access internet through terminal. In this situation, you need to make a export entries permanently in /etc/profile file. 

[root@localhost]# vi /etc/profile

on the bottom of this profile file paste the below two entry and save the file.

export http_proxy=http://10.13.2.34:8080
export https_proxy=https://10.13.2.34:8080

[root@localhost]# source /etc/profile

The above source command are used to make a entry permanently without taking a reboot of server.

➤ Let's suppose you want to allow internet only specific user then in this case you need to make the above export http & https entry in user bash profile. 

Please post the comment on this blog, if you have any query regarding this proxy topic.