Page tree

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Added how to remove transient route.

...

Trying to enable UFW inside of a container results in a a kernel needs to be upgraded error.

Port Forwarding using IP Tables

You might want to use one IP Address on the host and then map specific ports out from the containers. As a pre-requisite you will need to setup Static LXC Assigned IP address.

...

Now traffic on port 80 on the host will be forwarded to port 80 in the container IP specified.

You might want to delete the rule. Again, note this is not persistent upon reboot. Execute the exact same command to add, but change -A to -D,

Code Block
languagebash
 sudo iptables -t nat -D PREROUTING -p tcp -i eth0 --dport 80 -j DNAT --to-destination 10.0.3.10:80

 

macvlan with Additional IP

...