-
Notifications
You must be signed in to change notification settings - Fork 55
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
Allow split-tunneling from command line #34
Comments
Absolutely agree, this would be a great feature. Mainly just needs some new interface in piactl to add/remove apps, since the infrastructure to get and set preferences is already there. We do have the clunky way now with the The settings structure is documented in settings.h, for example here's the definition of a "split tunnel application rule": Line 956 in 508b67e
It'd be awesome to get a proper interface for split tunnel settings, but for now 'applysettings' can hopefully do what you need. |
great, thanks, I'll try it out. do I need to |
Generally, yes - and a Specifically, |
great stuff, thanks! 👍 I'm okay with the clunky command (for now) -- feel free to close this issue, or to leave it open as a placeholder for the feature request. while we are at it, though, how come nobody from PIA patrols the "community" portal? |
I'll leave it open - I think it's a great feature idea. I'm not sure where it will fall on our priorities list with everything we have in the pipeline, but if somebody wandered across this issue and wanted to put together a PR, that'd be amazing 🤩 That's a great question re: the community portal, I'll see what I can find out about that. |
Thanks for checking on the community portal - this was recently handed over to our CS team, and they're going to review issues monthly to send out to each department. There are some good suggestions on there that I'd like to get on our roadmap! |
quick follow up question: if I add my fresh IP to the allowed list like so:
which seems to me to be the only modification that PIA applies, well, it does not work. if instead I act directly on the
what am I missing? thanks. |
Hi @piramiday - the way we manage routing for split tunnel subnets is a little different than tradtional routing rules. We mark packets heading towards split subnets with the "excludePacketTag", see here: https://github.com/pia-foss/desktop/blob/master/daemon/src/posix/posix_firewall_iptables.cpp#L976-L984 This mark is then used by our routing policies to route the traffic out the physical interface. If you add rules of the form |
This comment was marked as outdated.
This comment was marked as outdated.
Hm, I would suggest adding a rule via the app - confirm that works - then look at the content of these chains for that app-added subnet. Then reproduce that for your custom subnets. After doing that, if that fails to work, i can look into it more deeply, but let's make sure we check that box first 😛 |
with respect to my old post, the problem was that yet another rule in the IP=12.34.56.78
sudo iptables -t filter -A piavpn.r.305.allowSubnets -d "$1/32" -j ACCEPT
sudo iptables -t mangle -A piavpn.r.200.tagFwdSubnets -d "$1/32" -j MARK --set-mark 12817
sudo iptables -t mangle -A piavpn.r.90.tagSubnets -d "$1/32" -j MARK --set-mark 12817 which of course will be applied if still, it is perfectly reasonable to have on a related note, it would be useful to have a way to add an IP to an already-present list of excluded IPs, instead of specifying the entire JSON I will then leave this issue open as a reminder that such features would be quite useful. |
+1 for the feature |
Hi.
I need to set bypass only for ip so I changed only these keys:
According to your need you can play with other sections. The simplest way - set required configuration in UI, close Settings and review configuration file. I have not found example in Google so here is a full example of my configuration for your reference:
|
hey @val-olfr, your comment is thorough but unnecessary. 🐰 as a brief recap, let me explain that the problem is twofold. how to modify settings from the command line? clunky but solved!
(as quoted from #34 (comment), which works well.) most importantly, you need to reconnect so that PIA might add the new entries to how to accomplish the same without reconnecting? clunky but solved! your comment forgets about the |
it would be useful for all headless installations to be able to control split-tunneling via the command-line
piactl
tool.for the time being, it would be awesome to get some clunky way to accomplish the same result, e.g. hard modifying the preferences to simulate what the GUI would have done, etc.
the feature has been proposed here, as well:
https://www.privateinternetaccess.com/helpdesk/community/view/split-tunnelling-through-command-line
The text was updated successfully, but these errors were encountered: