pia-foss / manual-connections

Scripts for manual connections to Private Internet Access
MIT License
566 stars 168 forks source link

[ Feature ] Running PIA in Linux netns container for multihead connection on multiple location #140

Closed nbanb closed 2 years ago

nbanb commented 2 years ago

Hi PIA DEVS

Sorry, but I did not see the activity about this git repo and project. I was requested to connect several destination of PIA VPN from the same linux instance.

I have read in the comment of one of the bash scripts ( I think it was the connectto{wireguard,openvpn}_with_token.sh) that maybe it could be done using wireguard for one location and openvpn for another.

I did not think it could be good way to achieve this goal on a Linux machine, it's maybe better to use the same protocol for all connections to be iso except for the destination where the VPN is connected.

As I haven't see the activity of this repository, I did not ask for the feature, I did it myself.

If you're interrested in, we can merge projects.

You can find the project and it's differents implementations here : https://github.com/nbanb/pia-wg-netns

PS : I'm not developper, so if you see in the code somethings which should be better, please do or ask to do.

Kind regards, nbanba

g00nix commented 2 years ago

Thank you for the ticket and nice work! Supporting network namespaces is not part of the scope of this repo.

I am however happy to see you managed to adapt this to your requirements!

nbanb commented 2 years ago

Dear G00nix

Thanks for your reply and help. I wrote this fork of this original repository because reading comments in the code of 'pia-foss/manual-connections' I seen you suggest to connect both WireGuard & OpenVPN to have a working double head connection and maybe there are interresting things to do in this way...

The work was not done in this actual repository, so to address this point, I thought the best way was to use the marvelous functionnality of Linux kernel network stack which allow a machine to have multiple default gateway from the same kernel instance when using network containers called 'namespaces'

That's why I wrote this code. I also wrote another implementation which could be really more simple to use on a laptop or a single Linux machine because I base it a a single network card architecture (which do not reflect my LAB network which expose service to internet on one interface of an external DMZ and which exposed service to all local subnet through another interface on an internal DMZ).

I will now create systemd helpers to use all these scripts as Linux systemd services. I will regulary update and maintained my github repository https://github.com/nbanb/pia-wg-netns and maybe you could add it to the list of external repository in pia-foss/manual-connections README.md

I will also reach the PIA White Hat program as I'm currently able to concurrently connect more than 10 different location using my system

Thanks again, Kind regards nbanba

Le 2021-12-28 05:25, goonix a écrit :

Thank you for the ticket and nice work! Supporting network namespaces is not part of the scope of this repo.

I am however happy to see you managed to adapt this to your requirements!

--

Reply to this email directly, view it on GitHub [1], or unsubscribe [2]. Triage notifications on the go with GitHub Mobile for iOS [3] or Android [4]. You are receiving this because you authored the thread.Message ID: @.***>

Links:

[1] https://github.com/pia-foss/manual-connections/issues/140#issuecomment-1001860162 [2] https://github.com/notifications/unsubscribe-auth/ADEYWJ2BUMDTXNO7CZC2ZU3UTE2YDANCNFSM5JQCLLZA [3] https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 [4] https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub