Help! Question about networking: Can container with private IP connect to each other?

  • Thread starter Thread starter zbrandom
  • Start date Start date
Z

zbrandom

Guest
Hi all,

I'm trying to set up a test server using promox VE. The host have a Internet IP, and all the containers use private IPs. But it seems to me that containers can't connect to each other, why? Did I do the configuration wrong?

My plan is to use DNAT to redirect traffic to port 80 of the host to one container running NGINX, and the NGINX fetch data from another container that is running Squid, and squid get all the data from another container that has Apache2. Is it doable?

I am new to virtualization, but I find it amazing. Please help me to figure out what is wrong. Thanks.
 
I'm trying to set up a test server using promox VE. The host have a Internet IP, and all the containers use private IPs. But it seems to me that containers can't connect to each other, why? Did I do the configuration wrong?

You are using openvz containers with virtual ethernet (venet)?

I just tested that, and it work here. To test the connection i use:

Code:
# ping  IPADDRESS

Maybe you used DNS names and DNS is not working because you use private IPs?

My plan is to use DNAT to redirect traffic to port 80 of the host to one container running NGINX, and the NGINX fetch data from another container that is running Squid, and squid get all the data from another container that has Apache2. Is it doable?

Why not? Although setting up DNAT needs manual iptables configuration.

- Dietmar
 
Yes, I am using OpenVZ with venet. I have just tried to ping after reading your reply, it worked. But I have spent a few hours trying to get NGINX work. maybe it is because of my configuration. I'll try that later.

There is a workaround that I came up with, which is installing NGINX on the host. I think NGINX is robust enough so it will not greatly hurt the reliability of the host. And Squeeze squid and apache in a container. But I don't think that satisfying.:(
 
It is definitely more secure running it after a firewall, but I am thinking of installing Shorewall on the host to take care of the firewall and stuff, what do you think about the idea? I guess iptables/netfilter is strong enough, but I don't have experience tweaking it. Any suggestion?
 
Thanks for your all, dietmar!
I reconfigured the environment, and it turned out that containers can connect to each other without problem! Proxmox is great!
 

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!