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
logrus.Warn("specifying --disable-host-loopback is highly recommended to prohibit connecting to 127.0.0.1:* on the host namespace (requires slirp4netns or VPNKit)")
349
+
logrus.Warn("specifying --disable-host-loopback is highly recommended to prohibit connecting to 127.0.0.1:* on the host namespace (requires pasta, slirp4netns, or VPNKit)")
344
350
}
345
351
346
352
slirp4netnsAPISocketPath:=""
@@ -354,11 +360,30 @@ func createParentOpt(clicontext *cli.Context, pipeFDEnvKey, stateDirEnvKey, pare
354
360
logrus.Warnf("unsupported mtu for --net=host: %d", mtu)
355
361
}
356
362
ifipnet!=nil {
357
-
returnopt, errors.New("custom cidr is supported only for --net=slirp4netns")
363
+
returnopt, errors.New("custom cidr is not supported for --net=host")
358
364
}
359
365
ififname!="" {
360
366
returnopt, errors.New("ifname cannot be specified for --net=host")
361
367
}
368
+
case"pasta":
369
+
logrus.Warn("\"pasta\" network driver is experimental. Needs very recent version of pasta (see docs/network.md). No support for forwarding UDP ports (yet).")
Copy file name to clipboardExpand all lines: docs/network.md
+24Lines changed: 24 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -3,6 +3,7 @@
3
3
RootlessKit provides several drivers for providing network connectivity:
4
4
5
5
*`--net=host`: use host network namespace (default)
6
+
*`--net=pasta`: use [pasta](https://passt.top/passt/) (experimental)
6
7
*`--net=slirp4netns`: use [slirp4netns](https://github.com/rootless-containers/slirp4netns) (recommended)
7
8
*`--net=vpnkit`: use [VPNKit](https://github.com/moby/vpnkit)
8
9
*`--net=lxc-user-nic`: use `lxc-user-nic` (experimental)
@@ -138,6 +139,29 @@ The network is configured as follows by default:
138
139
As in `--net=slirp4netns`, specifying `--copy-up=/etc` and `--disable-host-loopback` is highly recommended.
139
140
If `--disable-host-loopback` is not specified, ports listening on 127.0.0.1 in the host are accessible as 192.168.65.2 in the RootlessKit's network namespace.
`--net=pasta` is expected to be used in conjunction with `--port-driver=implicit`.
146
+
147
+
> **Note**
148
+
> `--net=pasta` needs [pasta (passt)](https://passt.top/passt/)`2023_06_25.32660ce` or later.
149
+
>
150
+
> Depending on the version of pasta and the host operating system,
151
+
> running `sudo apparmor_parser -R /etc/apparmor.d/usr.bin.passt` might be needed too.
152
+
153
+
Pros:
154
+
* Possible to perform network-namespaced operations, e.g. creating iptables rules, running `tcpdump`
155
+
* Supports ICMP Echo (`ping`) when `/proc/sys/net/ipv4/ping_group_range` is configured
156
+
* TCP port forwarding (`--port-driver=implicit`) is very fast
157
+
* TCP port forwarding (`--port-driver=implicit`) can retain source IP addresses
158
+
159
+
Cons:
160
+
* UDP port forwarding is not supported yet
161
+
162
+
The network configuration for pasta is similar to slirp4netns.
163
+
As in `--net=slirp4netns`, specifying `--copy-up=/etc` and `--disable-host-loopback` is highly recommended.
164
+
141
165
### `--net=lxc-user-nic` (experimental)
142
166
143
167
`--net=lxc-user-nic` isolates the network namespace from the host and launch [`lxc-user-nic(1)`](https://linuxcontainers.org/lxc/manpages/man1/lxc-user-nic.1.html) SUID binary for providing kernel-mode NAT.
0 commit comments