Many LXC behind a single IP address

xidev

New Member
Mar 16, 2016
3
0
1
34
I want to use different LXC (Linux Containers) with the help of Proxmox running on Debian. At the moment I have only one public IP Adress provided by my hoster.

  • IP Adress: 193.111.140.1XY
  • Network Adress: 193.111.140.0
  • Gateway: 193.111.140.1
  • Subnet Mask: 255.255.255.0 (/24)
^Copied from the web interface of my provider

I tried to use this guide to config /etc/network/interfaces without any luck. For me only eth0 is automatically generated and not vmbr0. Also I'm not quite sure what to edit within the Proxmox webinterface.

Any help would be highly appreciated. Thanks!
 
If you are going to use this for hosting I'd recommend you look into having one container running Nginx or Apache then routing the domains to their respective containers (which have IP addresses of your internal network), else try port forwarding.
 
  • Like
Reactions: xidev
*you will have all of your containers speaking out and receiving on the same IP (as far as the public can tell). It's kind of like having them all on separate machines inside your network with your primary container acting as the gate keeper and distributor of packets.
 
If you are going to use this for hosting I'd recommend you look into having one container running Nginx or Apache then routing the domains to their respective containers (which have IP addresses of your internal network), else try port forwarding.

Yes I wanted to use one container for nginx, one for sql, and so on. But actually I'm not even able to conenct the containers properly with the network. My host/node is connected via eth0.

Wv9y8S4.png


And now I need to create the connection for the containers (which are hosted on the node).
 
If you only have one IP address your host node should have an internal (we will use 192.168.1.2 for this example).

Try this setup:
  • Host node is 192.168.1.2
  • Nginx container is 193.111.14.1x
  • MySQL container is 192.168.1.3
http://www.tecmint.com/nginx-name-based-and-ip-based-virtual-hosts-server-blocks/

Also, I would check to make sure your router is making that IP available inside your network.

I think that's correct - anyone else feel free to correct me if i'm wrong.
 
  • Like
Reactions: xidev
If you only have one IP address your host node should have an internal (we will use 192.168.1.2 for this example).

Try this setup:
  • Host node is 192.168.1.2
  • Nginx container is 193.111.14.1x
  • MySQL container is 192.168.1.3
http://www.tecmint.com/nginx-name-based-and-ip-based-virtual-hosts-server-blocks/

Also, I would check to make sure your router is making that IP available inside your network.

I think that's correct - anyone else feel free to correct me if i'm wrong.

So for nginx contaner I am supposed to create a new "Linux Bridge" with:
gx67DIy.png


I am not quite sure how this is supposed to work. Am I able to use internal IP adresses as I want to and just have to copy Subnet mask and Gateway from the host/eth0? Actually I can not use the same gateway for vmbr0 as I used for eth0.

Thanks for your time and help. :)

Edit: My "network" section looks like this at the moment:

kzCioaH.png
 
Last edited:

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!