Difference between revisions of "LXC Ubuntu 16.04"

From MyWiki
Jump to: navigation, search
Line 8: Line 8:
 
iptables -t nat -A PREROUTING -i eth0 -p tcp --dport 80 -j DNAT --to [DestinationIP:PORT]
 
iptables -t nat -A PREROUTING -i eth0 -p tcp --dport 80 -j DNAT --to [DestinationIP:PORT]
 
iptables -t nat -A PREROUTING -p tcp -i eth0 --dport 587 -j DNAT  --to-destination 10.0.3.100:587
 
iptables -t nat -A PREROUTING -p tcp -i eth0 --dport 587 -j DNAT  --to-destination 10.0.3.100:587
 +
To set static ip addresses - https://medium.com/@ali_oguzhan/lxd-assigning-static-ip-to-containers-ecf558982071
 
</source>
 
</source>

Revision as of 10:35, 17 May 2018

https://tutorials.ubuntu.com/tutorial/tutorial-setting-up-lxd-1604#2

There are two repositories -    images repository  and  ubuntu repository
lxc image list images:
lxc image list ubuntu:
https://www.youtube.com/watch?v=snWp-5K2LO4
lxc exec first -- /bin/bash
iptables -t nat -A PREROUTING -i eth0 -p tcp --dport 80 -j DNAT --to [DestinationIP:PORT]
iptables -t nat -A PREROUTING -p tcp -i eth0 --dport 587 -j DNAT  --to-destination 10.0.3.100:587
To set static ip addresses - https://medium.com/@ali_oguzhan/lxd-assigning-static-ip-to-containers-ecf558982071