diff --git a/doc/reference/devices_proxy.md b/doc/reference/devices_proxy.md index 6a4b538b398c..287df8ce50d0 100644 --- a/doc/reference/devices_proxy.md +++ b/doc/reference/devices_proxy.md @@ -78,3 +78,19 @@ However, when using NAT mode, you must specify an IP address on the LXD host. :start-after: :end-before: ``` + +## Configuration examples + +Add a `proxy` device that forwards traffic from one address (the `listen` address) to another address (the `connect` address) using NAT mode: + + lxc config device add proxy nat=true listen=tcp:: connect=tcp:: + +Add a `proxy` device that forwards traffic going to a specific IP to a Unix socket on an instance that might not have a network connection: + + lxc config device add proxy listen=tcp:: connect=unix:/ + +Add a `proxy` device that forwards traffic going to a Unix socket on an instance that might not have a network connection to a specific IP address: + + lxc config device add proxy bind=instance listen=unix:/ connect=tcp:: + +See {ref}`instances-configure-devices` for more information.