I have a LX container on Ubuntu 13.04 which has worked flawless for the last 161 days. I restarted the host and started all the LXC's and I'm allowed to connect to the LXC containers from the outside. But I can't establish connections from inside a LXC and out.

Trying to ping Google.com or any other site doesn't work. apt-get won't fetch anything.

I have no idea as to what have changed and I have no idea where to look.

Host works just fine with ingoing and outgoing network traffic.

The LXC config is standard from Ubuntus apt-get installation.

  • can you show the container config and give more information? – c4f4t0r Jul 9 '14 at 22:58

It seems that I was missing some details when using prerouting.

Adding iptables -t nat -A POSTROUTING -s -o eth0 -j MASQUERADE to my iptables solved the issue.

  • Could you give some more information to help other people? This is a bit obscure. – Robin Winslow Oct 6 '14 at 13:23
  • I would if I could, but my knowledge regarding iptables is limited so I have no clear idea as to why this works. – Repox Oct 7 '14 at 6:33
  • Ah fair enough. – Robin Winslow Oct 7 '14 at 7:39

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.