Designate IPs to specific VMs on multi-ip and multi-interface setup

LeadGuit

New Member
Jul 9, 2015
1
0
1
Hi there,

I've got a special kind of issue:

I've got a server with multiple network ports of which everyone gets a different IP. My goal is to:
  • redirect specific port coming from IP1 -> Containers
  • redirect Webtraffic from IP1 -> Proxy -> Containers
  • redirect all traffic from IP2 -> VM2
  • redirect all traffic from IP3 -> VM3
So basically run some webservices and appliances on specific ports (works), route webtraffic for e.g. static websites through a proxy to the VMs (works) and redirect all incoming traffic directly to a specific VM - so this VM would "appear" to be a physical machine - so SSH goes directly into it, web etc. (doesn't work).

I've tried different things but nothing seemed to work. Everything runs fine from IP1, so the "basic setup": port-forwarding to VM, route incoming webtraffic through a proxy. However, redirect all traffic to a certain VM did not work, so that when traffic comes in from IP2, the response comes from IP1 - the host itself (so webtraffic coming into IP2 gets responded by the host - not the proxy).

My setup /equipment is as follows:
  • Physical network ports connected via wire into switch
  • proxmox 3 with shorewall for port forwarding and protection
  • Nginx-Proxy for Webtraffic reverse proxying
  • different OpenVZ containers

Could you help me?

Best,
LeadGuit
 

Mr.Holmes

Member
Apr 5, 2014
281
2
16
Hello LeadGuit

redirect all traffic from IP2 -> VM2
redirect all traffic from IP3 -> VM3
I understood each IP has it´s own physical NIC. The easiest way to implement the above is to bridge the NICs for IP2 and IP3 to diffrent bridges, without any IP address in the host but IP2 and IP3 in the VMs.

Kind regards

Mr.Holmes
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE 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 your own in 60 seconds.

Buy now!