Welcome!

The kernel problem with recent updates has been solved. Find the solution here

Important information
-- Required MX 15/16 Repository Changes
-- Information on torrent hosting changes
-- Information on MX15/16 GPG Keys
-- Spectre and Meltdown vulnerabilities

News
-- Introducing our new Website
-- MX Linux on social media: here

Current releases
-- MX-18.3 Point Release release info here
-- Migration Information to MX-18 here
-- antiX-17.4.1 release info here

New users
-- Please read this first, and don't forget to add system and hardware information to posts!
-- Here are the Forum Rules

To auto-connect to your VPN, and ONLY your VPN

Here is where you can post tips and tricks to share with other users of MX. Do not ask for help in this Forum.
Post Reply
User avatar
Captain Brillo
Forum Regular
Forum Regular
Posts: 198
Joined: Mon Jan 07, 2019 12:29 am

To auto-connect to your VPN, and ONLY your VPN

#1

Post by Captain Brillo » Thu Jan 10, 2019 7:16 pm

If you use ufw as your firewall, ruen these commands to set it up:

Code: Select all

sudo ufw default deny outgoing
sudo ufw default deny incoming
sudo ufw allow out on tun0 from any to any
sudo ufw allow in on tun0 from any to any
sudo ufw allow out from any to xxx.xxx.xxx  <your vpn server address>	
sudo ufw enable
sudo ufw status
You won't need a kill switch, because if the VPN connection drops, it's like pulling the plug.
Then, run this command:

Code: Select all

nmcli con
which will give you the id of the vpn connection; next run this:

Code: Select all

nmcli con up uuid <the uuid of the vpn connection>
Refer this post how to add to your startup:
viewtopic.php?f=104&t=47748

And an added bonus, when you're looking at www.ipleak.net and such places, this site's instructions about IPv6 take care of that, too.
http://ask.xmodulo.com/disable-ipv6-linux.html
GAFA-free zone

User avatar
handy
Forum Regular
Forum Regular
Posts: 330
Joined: Mon Apr 23, 2018 2:00 pm

Re: To auto-connect to your VPN, and ONLY your VPN

#2

Post by handy » Thu Jan 10, 2019 8:33 pm

Good how-to Captain Brillo I've bookmarked it. :)

For those of us who use PIA - VPN, we can do it via their provided, & brilliant, client GUI that makes it as easy as clicking a switch (literally) to turn on the "VPN Kill switch", among other settings. It is a shame that all of the VPN providers don't make it that easy & effective.
Clevo N'book (2014): P150SM-A
CPU: i7-4810MQ (Haswell) Speed: 2800/3800 MHz
RAM: 16 GiB 1600 MHz DDR3
GPU-1: i915
GPU-2: NVIDIA GK104M [GeForce GTX 880M] vRAM: 8GB 2500 Mhz DDR5
Storage: TOSHIBA 931.51 GiB. HGST 931.51 GiB. Crucial 223.57 GiB (M.2 SSD)

User avatar
Captain Brillo
Forum Regular
Forum Regular
Posts: 198
Joined: Mon Jan 07, 2019 12:29 am

Re: To auto-connect to your VPN, and ONLY your VPN

#3

Post by Captain Brillo » Thu Jan 10, 2019 9:56 pm

The goal is to be as invisible as you know how to be.
GAFA-free zone

User avatar
handy
Forum Regular
Forum Regular
Posts: 330
Joined: Mon Apr 23, 2018 2:00 pm

Re: To auto-connect to your VPN, and ONLY your VPN

#4

Post by handy » Fri Jan 11, 2019 4:13 am

& that sir, Captain Brillo, has been a focus of mine for more years now than I can remember... Personal privacy is not something that I take at all lightly.

I've watched as the government of my country (Oz) has descended into doing so many things, that 20 years ago it would have prosecuted to the fullest extent of the law... itself!

So, I take all of the action that I can to make it as expensive as can be for the tracker to include me in their net.

That said, I've just bought a DJI Mavic Pro 2 drone, & am finally forced to create a G**gle account (with false info' where possible - not that I think it makes much difference when they have your phone number lol) so that I can install the DJI Go4 app (so now the Chinese can track me too! lol) that is required to be on my Android (Can't get it outside of G**gle or Ap*le like you can so many other apps - not that I use more than half a dozen of them anyway - not a phoney). :(

Anyway, we do the best we can, & it is never enough these days - IF you use IT. You really can't win.

We can make it a bit harder (more expensive) for THEM - "all those people that are out there looking after our best interest". But that is really all we can do, as in the end our ultimately ineffective attempts to maintain personal privacy are really only political statements that show up in the spreadsheet statistics of those that are watching & collecting/collating data on their demographics.
Clevo N'book (2014): P150SM-A
CPU: i7-4810MQ (Haswell) Speed: 2800/3800 MHz
RAM: 16 GiB 1600 MHz DDR3
GPU-1: i915
GPU-2: NVIDIA GK104M [GeForce GTX 880M] vRAM: 8GB 2500 Mhz DDR5
Storage: TOSHIBA 931.51 GiB. HGST 931.51 GiB. Crucial 223.57 GiB (M.2 SSD)

User avatar
Captain Brillo
Forum Regular
Forum Regular
Posts: 198
Joined: Mon Jan 07, 2019 12:29 am

Re: To auto-connect to your VPN, and ONLY your VPN

#5

Post by Captain Brillo » Fri Feb 01, 2019 6:36 pm

I've managed to avoid needing a smartphone, and stayed GAFA free. I use multiple emails, and multiple browsers configured differently. VBox for some things.
I'm also retired and have lots of time, and doing all this is huge fun.
Hide-and-Seek all over again. mwwwwuaha
GAFA-free zone

Post Reply

Return to “Tips&Tricks”