loading...

In Windows (10), how to configure global proxy settings for all network connections and not just 'the internet'?

jochemstoel profile image Jochem Stoel ・1 min read

I run a squid proxy server on some Ubuntu machine. I use a Windows 10 client with Google Chrome to surf anonymously and watch dirty videos.

Both Microsoft browsers and Chrome's proxy settings point to Internet Options of Windows. Firefox has its own settings that lets you configure your proxy only for Firefox.

Internet Options

Many applications (like cmd.exe, WinSCP, putty, mIRC, Node, youtube-dl, ...) ignore the proxy configuration from internet options and connect directly.

If I go to https://api.ipify.org/?format=json in a browser, the IP address in the response is that of my proxy like expected but if I run ipify from the command line (which simply makes a http request to the same url) it shows the client's (my) ip address.

Most applications allow you to configure a proxy but not all of them. To prevent the pain of having to configure proxy settings for every single application and the agony of wrapping, sandboxing or virtualizing those that have no proxy settings I figured we can probably change proxy settings somewhere on the level of operating system.

Proxy Settings

The configuration here reflects that of internet options. They are the same settings just two screens to edit them.

How do I configure a 'global' proxy that applies to all connections in every application?

Posted on May 5 '18 by:

jochemstoel profile

Jochem Stoel

@jochemstoel

Pellentesque nec neque ex. Aliquam at quam vitae lacus convallis pulvinar. Mauris vitae ullamcorper lacus. Cras nisi dui, faucibus non dolor quis, volutpat euismod massa. Donec et pulvinar erat.

Discussion

markdown guide
 

Well Jochem,

Proxy configurations generally happen on a higher level. What you are looking for is a VPN. I suggest you have a look at OpenVPN, an open source VPN server.

Unlike a proxy, which only secures your torrent client or web browser, VPN (Virtual Private Network) encrypted tunneling secures 100% of all your internet access, replacing your local ISP routing for all applications. With a fully anonymous VPN server, you will enjoy enhanced security regardless of geographic location.

Install 'net-tools' and 'wget' packages

apt-get install net-tools wget

It is required that the time and date on the server are correct. VPN server and client certificates are generated with an expiration date 10 years into the future so they're unlikely to expire any time soon. But they are also generated with a start date, and if that date is in the future because the server has a date set in the future, then the certificates won't work until that date and you'll get some errors about that.

Download Access Server 2.1.12 for Ubuntu/Debian

wget http://swupdate.openvpn.org/as/openvpn-as-2.1.12-Ubuntu16.amd_64.deb

Install downloaded package on Debian/Ubuntu:

dpkg -i openvpn-as-2.1.12-Ubuntu16.amd_64.deb

Configuration

Initially a single administrative user is added to the system. But it has no password set and therefore cannot be used yet. To use it a password must be set first as you can see below.

Please enter "passwd openvpn" to set the initial
administrative password, then login as "openvpn" to continue
configuration here: https://xxx.xxx.xx.xxx:943/admin

To reconfigure manually, use the /usr/local/openvpn_as/bin/ovpn-init tool.

+++++++++++++++++++++++++++++++++++++++++++++++
Access Server Web UIs are available here:
Admin  UI: https://xxx.xxx.xx.xxx:943/admin
Client UI: https://xxx.xxx.xx.xxx:943/
+++++++++++++++++++++++++++++++++++++++++++++++

Set password for openvpn user

User openvpn is a regular Linux user like root so we can change the password like so.

passwd openvpn

Now go to the admin panel on xxx.xxx.xx.xxx:943/admin (where xxx.xxx.xx.xxx is your server IP) and login using the password you just set.
OpenVPN login screen

Download the client application for Windows. (I believe you said you were using Windows 10)
OpenVPN download client screen

Installing the client will not take more than 5 seconds. Once installed and running, an OpenVPN icon will appear in your taskbar system tray.
Simply connect to your server IP as user openvpn and the password you set in the command line.

Voila! You are connected to your VPN.

I hope this helps you. By all means let me know if you have any questions. After all that's how helpful we all are here on dev.to

Read more