Page tree

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Generate mac address same way lxc does - http://giantdorks.org/alain/how-to-generate-a-unique-mac-address/sudo iptables -t nat -L -n -vChain PREROUTING (policy ACCEPT 15 packets, 957 bytes) pkts bytes target     prot opt in     out     source               destination             1    64 DNAT       tcp  --  eth0   *       0.0.0.0/0            0.0.0.0/0            tcp dpt:23 to:10.0.3.11:22
Chain INPUT (policy ACCEPT 1 packets, 229 bytes) pkts bytes target     prot opt in     out     source               destination         
Chain OUTPUT (policy ACCEPT 0 packets, 0 bytes) pkts bytes target     prot opt in     out     source               destination         
Chain POSTROUTING (policy ACCEPT 0 packets, 0 bytes) pkts bytes target     prot opt in     out     source               destination          695K   53M

MASQUERADE  all  --  *      *       10.0.3.0/24         !10.0.3.0/24         More in depth and discusses outbound NAT so containers can communicate to other container public IPs -http://blog.codeaholics.org/2013/giving-dockerlxc-containers-a-routable-ip-address/