Saturday, April 27, 2024
 Popular · Latest · Hot · Upcoming
5
rated 0 times [  5] [ 0]  / answers: 1 / hits: 49260  / 2 Years ago, tue, july 19, 2022, 7:55:26

I setup LXC using:



lxc-create -t ubuntu -n lxcguest1


But I can't access any services running on it from my LAN, it appears to be NATed. How do I set it up so that I can access it (it probably needs to get it's dhcp address from my Linksys router)?



Thanks.


More From » networking

 Answers
5

I've just dealt with this issue myself. Basically you need to setup a bridge and bind your network card and container to it. Here is the article I followed:



http://bj0z.wordpress.com/2011/08/19/howto-build-a-base-lxc-container-in-ubuntu-11-04/



Sounds as if like me, you require the 'bridge' solution rather than the NAT solution.
I also turned off the default LXC bridge setup (which is NAT'ed). To do this just edit the file: /etc/default/lxc and change USE_LXC_BRIDGE="TRUE" to USE_LXC_BRIDGE="FALSE" and reboot.


[#33559] Wednesday, July 20, 2022, 2 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
erettor

Total Points: 303
Total Questions: 121
Total Answers: 103

Location: Colombia
Member since Mon, May 2, 2022
2 Years ago
;