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
Message
Author
User avatar
Captain Brillo
Posts: 106
Joined: Mon Jan 07, 2019 12:29 am

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

#1 Post by Captain Brillo »

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
Posts: 611
Joined: Mon Apr 23, 2018 2:00 pm

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

#2 Post by handy »

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.
1_MSI: MAG B560 TORP', i5, RAM 16GB, GTX 1070 Ti 12GB, M2 238GB + USB, MX-23 Fb to Openbox
2_Lenovo: Ideapad 520S, i5, RAM 8GB, GPU i620, HDD 1TB, MX-21 - Openbox
3_Clevo: P150SM-A, i7, RAM 16GB, nVidia 8600, 2x 1TB HDD & M.2 256 GB, MX-21 - Openbox

User avatar
Captain Brillo
Posts: 106
Joined: Mon Jan 07, 2019 12:29 am

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

#3 Post by Captain Brillo »

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

User avatar
handy
Posts: 611
Joined: Mon Apr 23, 2018 2:00 pm

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

#4 Post by handy »

& 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.
1_MSI: MAG B560 TORP', i5, RAM 16GB, GTX 1070 Ti 12GB, M2 238GB + USB, MX-23 Fb to Openbox
2_Lenovo: Ideapad 520S, i5, RAM 8GB, GPU i620, HDD 1TB, MX-21 - Openbox
3_Clevo: P150SM-A, i7, RAM 16GB, nVidia 8600, 2x 1TB HDD & M.2 256 GB, MX-21 - Openbox

User avatar
Captain Brillo
Posts: 106
Joined: Mon Jan 07, 2019 12:29 am

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

#5 Post by Captain Brillo »

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 by users”