You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Conceptually equivalent to networking by means of slirp4netns(1),
with a few practical differences:
- pasta(1) forks to background once networking is configured in the
namespace and quits on its own once the namespace is deleted:
file descriptor synchronisation and PID tracking are not needed
- port forwarding is configured via command line options at start-up,
instead of an API socket: this is taken care of right away as we're
about to start pasta
- there's no need for further selection of port forwarding modes:
pasta behaves similarly to containers-rootlessport for local binds
(splice() instead of read()/write() pairs, without L2-L4
translation), and keeps the original source address for non-local
connections like slirp4netns does
- IPv6 is not an experimental feature, and enabled by default. IPv6
port forwarding is supported
- by default, addresses and routes are copied from the host, that is,
container users will see the same IP address and routes as if they
were in the init namespace context. The interface name is also
sourced from the host upstream interface with the first default
route in the routing table. This is also configurable as documented
- sandboxing and seccomp(2) policies cannot be disabled
- only rootless mode is supported.
See https://passt.top for more details about pasta.
Also add a link to the maintained build of pasta(1) manual as valid
in the man page cross-reference checks: that's where the man page
for the latest build actually is -- it's not on Github and it doesn't
match any existing pattern, so add it explicitly.
Signed-off-by: Stefano Brivio <sbrivio@redhat.com>
Copy file name to clipboardExpand all lines: docs/source/markdown/options/network.md
+39Lines changed: 39 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -35,3 +35,42 @@ Valid _mode_ values are:
35
35
-**port_handler=rootlesskit**: Use rootlesskit for port forwarding. Default.
36
36
Note: Rootlesskit changes the source IP address of incoming packets to an IP address in the container network namespace, usually `10.0.2.100`. If your application requires the real source IP address, e.g. web server logs, use the slirp4netns port handler. The rootlesskit port handler is also used for rootless containers when connected to user-defined networks.
37
37
-**port_handler=slirp4netns**: Use the slirp4netns port forwarding, it is slower than rootlesskit but preserves the correct source IP address. This port handler cannot be used for user-defined networks.
38
+
39
+
-**pasta[:OPTIONS,...]**: use **pasta**(1) to create a user-mode networking
40
+
stack. \
41
+
This is only supported in rootless mode. \
42
+
By default, IPv4 and IPv6 addresses and routes, as well as the pod interface
43
+
name, are copied from the host. If port forwarding isn't configured, ports
44
+
will be forwarded dynamically as services are bound on either side (init
45
+
namespace or container namespace). Port forwarding preserves the original
46
+
source IP address. Options described in pasta(1) can be specified as
47
+
comma-separated arguments. \
48
+
In terms of pasta(1) options, **--config-net** is given by default, in
49
+
order to configure networking when the container is started, and
50
+
**--no-map-gw** is also assumed by default, to avoid direct access from
51
+
container to host using the gateway address. The latter can be overridden
52
+
by passing **--map-gw** in the pasta-specific options (despite not being an
53
+
actual pasta(1) option). \
54
+
Also, **-t none** and **-u none** are passed if, respectively, no TCP or
55
+
UDP port forwarding from host to container is configured, to disable
56
+
automatic port forwarding based on bound ports. Similarly, **-T none** and
57
+
**-U none** are given to disable the same functionality from container to
58
+
host. \
59
+
Some examples:
60
+
-**pasta:--map-gw**: Allow the container to directly reach the host using the
61
+
gateway address.
62
+
-**pasta:--mtu,1500**: Specify a 1500 bytes MTU for the _tap_ interface in
Copy file name to clipboardExpand all lines: docs/source/markdown/podman-create.1.md.in
+6-3Lines changed: 6 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -491,8 +491,11 @@ In order for users to run rootless, there must be an entry for their username in
491
491
492
492
Rootless Podman works better if the fuse-overlayfs and slirp4netns packages are installed.
493
493
The fuse-overlayfs package provides a userspace overlay storage driver, otherwise users need to use
494
-
the vfs storage driver, which is diskspace expensive and does not perform well. slirp4netns is
495
-
required for VPN, without it containers need to be run with the --network=host flag.
494
+
the vfs storage driver, which can be disk space expensive and less performant
495
+
than other drivers.
496
+
497
+
To enable VPN on the container, slirp4netns or pasta needs to be specified;
498
+
without either, containers need to be run with the --network=host flag.
496
499
497
500
## ENVIRONMENT
498
501
@@ -541,7 +544,7 @@ page.
541
544
NOTE: Use the environment variable `TMPDIR` to change the temporary storage location of downloaded container images. Podman defaults to use `/var/tmp`.
Copy file name to clipboardExpand all lines: docs/source/markdown/podman-run.1.md.in
+6-3Lines changed: 6 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -837,8 +837,11 @@ In order for users to run rootless, there must be an entry for their username in
837
837
838
838
Rootless Podman works better if the fuse-overlayfs and slirp4netns packages are installed.
839
839
The **fuse-overlayfs** package provides a userspace overlay storage driver, otherwise users need to use
840
-
the **vfs** storage driver, which is diskspace expensive and does not perform well. slirp4netns is
841
-
required for VPN, without it containers need to be run with the **--network=host** flag.
840
+
the **vfs** storage driver, which can be disk space expensive and less
841
+
performant than other drivers.
842
+
843
+
To enable VPN on the container, slirp4netns or pasta needs to be specified;
844
+
without either, containers need to be run with the --network=host flag.
842
845
843
846
## ENVIRONMENT
844
847
@@ -885,7 +888,7 @@ page.
885
888
NOTE: Use the environment variable `TMPDIR` to change the temporary storage location of downloaded container images. Podman defaults to use `/var/tmp`.
Copy file name to clipboardExpand all lines: docs/source/markdown/podman.1.md
+5-3Lines changed: 5 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -88,7 +88,7 @@ Set libpod namespace. Namespaces are used to separate groups of containers and p
88
88
When namespace is set, created containers and pods will join the given namespace, and only containers and pods in the given namespace will be visible to Podman.
89
89
90
90
#### **--network-cmd-path**=*path*
91
-
Path to the command binary to use for setting up a network. It is currently only used for setting up a slirp4netns network. If "" is used then the binary is looked up using the $PATH environment variable.
91
+
Path to the command binary to use for setting up a network. It is currently only used for setting up a slirp4netns(1) or pasta(1) network. If "" is used then the binary is looked up using the $PATH environment variable.
92
92
93
93
#### **--network-config-dir**=*directory*
94
94
@@ -422,7 +422,9 @@ See the `subuid(5)` and `subgid(5)` man pages for more information.
422
422
423
423
Images are pulled under `XDG_DATA_HOME` when specified, otherwise in the home directory of the user under `.local/share/containers/storage`.
424
424
425
-
Currently the slirp4netns package is required to be installed to create a network device, otherwise rootless containers need to run in the network namespace of the host.
425
+
Currently slirp4netns or pasta is required to be installed to create a network
426
+
device, otherwise rootless containers need to run in the network namespace of
427
+
the host.
426
428
427
429
In certain environments like HPC (High Performance Computing), users cannot take advantage of the additional UIDs and GIDs from the /etc/subuid and /etc/subgid systems. However, in this environment, rootless Podman can operate with a single UID. To make this work, set the `ignore_chown_errors` option in the /etc/containers/storage.conf or in ~/.config/containers/storage.conf files. This option tells Podman when pulling an image to ignore chown errors when attempting to change a file in a container image to match the non-root UID in the image. This means all files get saved as the user's UID. Note this could cause issues when running the container.
428
430
@@ -435,7 +437,7 @@ The Network File System (NFS) and other distributed file systems (for example: L
435
437
For more information, please refer to the [Podman Troubleshooting Page](https://github.com/containers/podman/blob/main/troubleshooting.md).
0 commit comments