aboutgitcodebugslistschat
path: root/passt.1
diff options
context:
space:
mode:
authorDavid Gibson <david@gibson.dropbear.id.au>2024-08-21 14:20:17 +1000
committerStefano Brivio <sbrivio@redhat.com>2024-08-21 12:00:35 +0200
commite813a4df7da28a69ef32642f42fd625aea798967 (patch)
tree081ec82de11eb4f99fc4675ed3ac238d23779f4c /passt.1
parentdbaaebbe005321855eeb731ca1fce82e27d2bf47 (diff)
downloadpasst-e813a4df7da28a69ef32642f42fd625aea798967.tar
passt-e813a4df7da28a69ef32642f42fd625aea798967.tar.gz
passt-e813a4df7da28a69ef32642f42fd625aea798967.tar.bz2
passt-e813a4df7da28a69ef32642f42fd625aea798967.tar.lz
passt-e813a4df7da28a69ef32642f42fd625aea798967.tar.xz
passt-e813a4df7da28a69ef32642f42fd625aea798967.tar.zst
passt-e813a4df7da28a69ef32642f42fd625aea798967.zip
conf: Allow address remapped to host to be configured
Because the host and guest share the same IP address with passt/pasta, it's not possible for the guest to directly address the host. Therefore we allow packets from the guest going to a special "NAT to host" address to be redirected to the host, appearing there as though they have both source and destination address of loopback. Currently that special address is always the address of the default gateway (or none). That can be a problem if we want that gateway to be addressable by the guest. Therefore, allow the special "NAT to host" address to be overridden on the command line with a new --map-host-loopback option. In order to exercise and test it, update the passt_in_ns and perf tests to use this option and give different mapping addresses for the two layers of the environment. Signed-off-by: David Gibson <david@gibson.dropbear.id.au> Signed-off-by: Stefano Brivio <sbrivio@redhat.com>
Diffstat (limited to 'passt.1')
-rw-r--r--passt.114
1 files changed, 14 insertions, 0 deletions
diff --git a/passt.1 b/passt.1
index dca433b..e85d988 100644
--- a/passt.1
+++ b/passt.1
@@ -328,6 +328,20 @@ Disable Router Advertisements. Router Solicitations coming from guest or target
namespace will be ignored.
.TP
+.BR \-\-map-host-loopback " " \fIaddr
+Translate \fIaddr\fR to refer to the host. Packets from the guest to
+\fIaddr\fR will be redirected to the host. On the host such packets
+will appear to have both source and destination of 127.0.0.1 or ::1.
+
+If \fIaddr\fR is 'none', no address is mapped (this implies
+\fB--no-map-gw\fR). Only one IPv4 and one IPv6 address can be
+translated, if the option is specified multiple times, the last one
+takes effect.
+
+Default is to translate the guest's default gateway address, unless
+\fB--no-map-gw\fR is given, in which case no address is mapped.
+
+.TP
.BR \-\-no-map-gw
Don't remap TCP connections and untracked UDP traffic, with the gateway address
as destination, to the host. Implied if there is no gateway on the selected