How to add proxy to Ubuntu
First of all we need to understand what is proxy and how does it work.
What is a proxy?
A proxy or proxy server is basically another computer which serves as a hub through which internet requests are processed. By connecting through one of these servers, your computer sends your requests to the proxy server which then processes your request and returns what you were wanting. In this way it serves as an intermediary between clients & resources
Why add Proxy to Ubuntu
There are many purposes to add proxy to Ubuntu
1. it is used for tunneling firewalls and anonymous surfing
It keeps the computers behind it anonymous (mainly for security) by hiding (IP addresses, port, etc) from hackers.
It speeds up access to a resource by caching.
One internet connection can be used by more than one computer using proxy.
Proxy servers will have a list “proxy list” to filter the unwanted contents (you can modify the contents).
Note:
There are some proxies which are free and some which charge money, the choice is up to you but we have found that the paid proxies are more reliable, faster and more secure.
How to add proxy server to Ubuntu desktop?
Ubuntu has a setting in gnome for the Network Proxy, which should set gnome’s proxy.
There are two ways to add proxy server to Ubuntu
First way: Configuring proxy from terminal
1. Click in Dash home icon then in search bar type terminal.
2. With that done, the terminal application will pop-up then open it
3. when it’s opened type the command
gsettings set org.gnome.system.proxy.socks host ‘192.168.0.1’ and hit Enter
Over here we directly editing the gsettings file to define the proxy settings
4. In next line, type
gsettings set org.gnome.system.proxy.socks port 8080 and hit Enter
This command will define the port that the proxy will listen to
5. Last of all, type
gsettings set org.gnome.system.proxy mode ‘manual’
Over here we define the mode of setting proxy which in this case is manual.
That’s it the proxy setting successfully configured.
If we want to disable the proxy settings type the command
gsettings set org.gnome.system.proxy mode ‘none’
With that done, all proxy settings will be disabled.
Second way: Configuring proxy from Network proxy
- click on system settings
- click on network
- open network proxy
- set method to manual
- enter your proxy and port
- Copy your proxy and port to other fields (HTTPS/FTP/Socks host).
- click Apply system wide
- enter the password of your account and Authenticate
- close the network settings
- open dach home -> terminal
- type command sudo nano /etc/apt/apt.conf then Enter
- enter the password of your proxy and hit Enter
- you need to change few settings
- Type the proxy username and password for (HTTP/FTP/HTTPS)
- Which is here username:eduguest& password:eduguest
- When we done press ctrl + x to exit then y to yes save and then enter.
- Now your computer will work for everything with also authenticated proxy server. So All programs will work