-
Notifications
You must be signed in to change notification settings - Fork 103
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
new network driver: pasta
(with port driver implicit
)
#358
Conversation
I just found this -- let me know if you need any support with it! |
Thanks, the current blocker of this PR is how to dynamically expose and unexpose ports, without restarting the pasta process. |
So far, we didn't add any possibility of dynamic and explicit, user-supplied port forwarding configuration, because of these potential downsides with regard to security aspects:
I'm not claiming it's impossible to implement this in a secure way, I'm just saying it's much harder. I understand this might cause some headaches in integrations, but is the automatic port forwarding really not good enough for rootlesskit use cases? If it's not, I would rather consider a binary configuration file, just for ports, possibly four different filesystem entries (TCP and UDP over IPv4 and IPv6), reloaded via inotify (we already use one inotify listener in pasta, to detect that a filesystem-bound namespace is going away and exit). The user would create those files, pass them as command line options, and also be in charge of their permissions. In AppArmor and SELinux rules, we would just need to make sure that pasta is able to read from those files. Cc: @dgibson |
Thanks for explanation
Not enough for RootlessKit, as RootlessKit adopts an explicit port API: https://github.com/rootless-containers/rootlesskit/blob/v1.1.0/pkg/api/openapi.yaml#L20-L54
SGTM |
The default value of |
Well, we might already use one inotify instance (unless The
The inotify instance is poll()able, so it integrates quite naturally with the existing event model. Unless inotify is really unusable on Ubuntu, I'd rather stick to that. |
Update (18843cc)
|
pasta
pasta
(with port driver implicit
)
Sorry for the delay on the port forwarding functionality, and thanks for the error reports! I'm currently traveling, I'll look into them next week. |
2023_06_25.32660ce seems to have resolved several issues (Thanks @sbrivio-rh) TODO: analyze the dpkg issue |
Oh, you already noticed :) I wanted to finish building new versions of the packages I maintain (Debian and Fedora) versions before updating this ticket...
I updated the AppArmor profiles upstream and in the Debian packages (which are then synchronised to Ubuntu) after that package version, but I don't think I changed/fixed anything related to that. I'll try to have a look. |
5e91aa6
to
11b3f3c
Compare
@AkihiroSuda do you have some kind of timeline for version 2.0.0? I'm working on the port forwarding configuration stuff right now and I'm trying to understand if it makes sense that I try to rush a bit, a lot, or not at all :) |
Thanks. |
a0516f2
to
0665b27
Compare
Pasta: https://passt.top/passt/ Usage: `rootlesskit --net=pasta --port-driver=implicit` - No support for explicit port forwarding (`rootlessctl add-ports`), as pasta doesn't support it yet. Use `--port-driver=implicit` to let pasta forward TCP ports implicitly. The forwarded ports are not visible in `rootlessctl list-ports`. - No support for forwarding UDP ports - Tested with pasta 2023_06_25.32660ce on Ubuntu 23.04. Doesn't work with 2023_06_03.429e1a7: `Option --no-copy-routes needs --config-net` (This is printed despite that `--no-copy-routes` is not specified) - Doesn't work with Ubuntu 23.04's dpkg (passt_0.0~git20230216.4663ccc-1_amd64.deb): `Couldn't open user namespace /proc/51813/ns/user: Permission denied` Likely to be related to AppArmor. Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
Pasta: https://passt.top/passt/
Usage:
rootlesskit --net=pasta --port-driver=implicit
No support for explicit port forwarding (
rootlessctl add-ports
),as pasta doesn't support it yet.
Use
--port-driver=implicit
to let pasta forward TCP ports implicitly.The forwarded ports are not visible in
rootlessctl list-ports
.No support for forwarding UDP ports
Tested with pasta 2023_06_25.32660ce on Ubuntu 23.04.
Doesn't work with 2023_06_03.429e1a7:
Option --no-copy-routes needs --config-net
(This is printed despite that
--no-copy-routes
is not specified)Doesn't work with Ubuntu 23.04's dpkg (passt_0.0~git20230216.4663ccc-1_amd64.deb):
Couldn't open user namespace /proc/51813/ns/user: Permission denied
Likely to be related to AppArmor.
sudo apparmor_parser -R /etc/apparmor.d/usr.bin.passt
can eliminate this error, but pasta still fails with another error (Couldn't get any nameserver address
)