Skip to content

Instantly share code, notes, and snippets.

@ascorbic-acid
Created July 26, 2026 06:43
Show Gist options
  • Select an option

  • Save ascorbic-acid/4835fdaadb4b0d8c0e527f0d7733b988 to your computer and use it in GitHub Desktop.

Select an option

Save ascorbic-acid/4835fdaadb4b0d8c0e527f0d7733b988 to your computer and use it in GitHub Desktop.
LXD Nat Mode

set target container ip to be static

sudo lxc config device override sup eth0 ipv4.address=10.120.245.106

nat port forward, for example port 80

note: listen is your host public ip, cant be 0.0.0.0
sudo lxc config device add sup proxy80 proxy listen=tcp:8.8.8.8:80 connect=tcp:10.120.245.106:80 nat=true
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment