Rafficer / linux-cli-community

Linux command-line client for ProtonVPN. Written in Python.
https://protonvpn.com
GNU General Public License v3.0
1.28k stars 196 forks source link

[BUG] Protonvpn break docker networking #130

Open zaporylie opened 4 years ago

zaporylie commented 4 years ago

Describe the bug I use docker for local development. Since I'm developing on multiservice applications I use docker-compose to orchestrate containers. My applications usually have 2 docker networks, one for front-facing services, and one for internal communication. It all works until I connect to VPN using protonvpn-cli - then, suddenly, I'm no longer able to connect to my app or the app cannot use internal network to communicate between services.

To Reproduce Steps to reproduce the behavior:

  1. Start 2 services, group them in a common network (ex. 2 nginx servers).
  2. curl one service from another (and the other way around). Observe that there are no issues.
  3. Run sudo protonvpn c --fast
  4. curl one service from another (or the other way around). Observe that request is timing out.

Expected behavior I should be able to use docker with protonvpn simultaneously.

Desktop (please complete the following information):

Rafficer commented 4 years ago

Do you have the Kill Switch enabled? Turning that off should allow you to connect.

zaporylie commented 4 years ago

That's it. Thanks

Is it inevitable to block local connections when Kill Switch is enabled? I thought that's what following option should cover.

2) Enable Kill Switch (Allow access to/from LAN)
Rafficer commented 4 years ago

Looking at the iptables commands shows you what it covers. Docker goes over it's own interface, so iptables blocks it with that configuration.

antoin-m commented 4 years ago

Just disabling the kill switch didn't work for me, I also had to go with Alexander's solution. The other solutions in the thread probably work too but they seem... controversial.