How do I use `vopono` inside a tmux session?
kohane27 opened this issue · 2 comments
Hello @jamesmcm . Hope you're doing well. Thank you for creating vopono
. It's very useful for users like me when I only need to use VPN for only a handful of applications.
I have the following command:
$ vopono --verbose --askpass exec --firewall iptables --provider protonvpn --server japan kitty
such that all commands inside this kitty
terminal will be run through protonvpn. To verify I'm connected to vpn:
$ curl ifconfig.co/json | jq .time_zone
"Asia/Tokyo"
However, when I run tmux new
and run curl ifconfig.co/json | jq .time_zone
again, I'm not connected to vpn.
I'm not sure why this is the case. I just want to run curl
through the vpn inside a tmux session.
What I've Tried
- Running
tmux kill-server
before the abovevopono
command such that no existing server is running.
Remarks
I'm not sure if this is an issue with vopono
or openVPN config or tmux issue. Please excuse me if this is unrelated to vopono
. Any input is much appreciated. Thank you.
It's probably because tmux is running with a daemon, and so the tmux process itself isn't inside the network namespace.
tmux -D
might work to make it not use the server, but I haven't tested it.
Thank you for getting back to me. I really appreciate it.
Thank you for the pointer. It works!
tmux kill-server
vopono --verbose --askpass exec --firewall iptables --provider protonvpn --server japan kitty
tmux
The idea is to run vopono
to spawn a terminal, and then run tmux
from it, such that all connections from that tmux session is routed through the VPN.
Thank you again and have a good day!