Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How can I verify that vopono is using the VPN for a given application? #253

Open
ParetoOptimalDev opened this issue Mar 7, 2024 · 1 comment

Comments

@ParetoOptimalDev
Copy link

I believe it is since I tried starting firefox using vopono and verified the IP address was correct.

However if I'm using some non-browser application, I'm unsure how I can verify that application is only using the proxy I've configured vopono to use.

I think maybe one of these will do it, but haven't figured out how to use them to do it or don't understand the output well enough to verify the vpn is being used:

  • sudo netstat -nputw
  • nethogs
  • picosnitch

I think this is important and should be included in the manual because otherwise some users like me who want to independently and externally verify the vpn is used won't be confident in using it.

@jamesmcm
Copy link
Owner

If you run netstat inside the network namespace you can see the connections:

e.g.

$ sudo ip netns exec vo_c_UPcvBno netstat -anputw

And the same works for nethogs:

$ sudo ip netns exec vo_c_UPcvBno nethogs

You can use vopono list or sudo ip netns list to get the network namespace names. Then compare the PIDs to what you expect (e.g. given in the output of vopono or in htop) - likewise make sure those PIDs never appear when the same command is run outside of the network namespace.

The real issue here though is ensuring that the connection doesn't take place via IPC communication to a daemon outside the network namespace - this is an issue with gnome-terminal IIRC.

It's hard to stop that without greater isolation that would break things like PulseAudio/Pipewire functionality, but you might be able to do it by executing with firejail after just creating the network namespace in --keep-alive mode as in the docs here: https://github.com/jamesmcm/vopono/blob/master/USERGUIDE.md#creating-only-network-namespace

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants