Error: Invalid devices: Device validation failed for "myport443": Only NAT mode is supported for proxies on VM instances

When I do

lxc config device add swift-test myport443 proxy listen=tcp:0.0.0.0:443 connect=tcp:127.0.0.1:443

on my LxD vm, I got the following error:

Error: Invalid devices: Device validation failed for “myport443”: Only NAT mode is supported for proxies on VM instances

How do I set port on LxD VM?

You add nat=true to your device. Please see Instance configuration - LXD documentation

To use nat=true you’ll need to have a static IP allocation on your VM’s NIC for your connect address.

1 Like