From a534ee4a1e235ac109cd802777fb7147fb7bf084 Mon Sep 17 00:00:00 2001 From: Bram Prieshof Date: Fri, 21 May 2021 11:49:23 +0000 Subject: [PATCH] Update 'debian10-LXC.md' --- debian10-LXC.md | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/debian10-LXC.md b/debian10-LXC.md index 7eda027..c0ac97b 100644 --- a/debian10-LXC.md +++ b/debian10-LXC.md @@ -49,3 +49,24 @@ sysctl -p lxc.net.0.ipv4.address = 10.0.3./24 lxc.net.0.ipv4.gateway = 10.0.3.1 ``` + + +# UFW forwarding + +also dont forget to add the extenal port as allow rule +add to /etc/ufw/before.rules + +to begin of file before *filter +``` +*nat +:PREROUTING ACCEPT [0:0] +-A PREROUTING -i enp0s3 -p tcp --dport -j DNAT --to : +COMMIT +``` + +to end of file before last COMMIT +``` +#LXC forwards +-A FORWARD -o lxcbr0 -j ACCEPT +-A FORWARD -i lxcbr0 -j ACCEPT +```