Multiple VPS behind one public IP

T

thegmin

Guest
Hi all,
I have a question which bothers me from some time. Is it possible to have multiple VPS / with different internal IP's / every to have a mail server and apache with vhosts behind a router distro with 1 public IP? I dont know how to make this kind of redirection, because I am only limited to one public IP from my ISP. I was thinking of redirecting all ports to one VPS with apache and then from the httpd.conf to redirect to the other servers. But this way is too time taking and anyway I cant figure a way out to this with the mail.
Thanks in advance.
Gabriel

PS Maybe mod_proxy can do this, but what about the mail servers?
 
I'm not terribly familiar with the proxmox setup (I've only just started tinkering around with it), but I'd imagine that you could give each container a RFC1918 address, like 10.0.0.9 for mail, 10.0.0.10 for apache, etc, and then just use ipchains to forward packets destined for port 80 to say 10.0.0.10. You'd need to do a quick search for the exact syntax, but that should get you going.
 
It is all about ports translation and address redirection. If you have only one IP than you have only 65535 available ports. If you have web server in all vms than you have to use different port like 80, 81, 82 and use iptables to redirect these ports to different local addresses. Same for other services like SMTP for webmail which use port 25 by default.
Another solution for web server could be domain virtual host provided by apache and redirect http queries to local virtual hosts by apache installed on hw node.
I should suggest to obtain more public ip if it is possible.
You can setup secured ip tunnel to dedicated server at some hosting company which can provide more cheaper public addresses too.
 
Hi all,
PS Maybe mod_proxy can do this, but what about the mail servers?

Apache2 resolves the problem of the http
and a simple qmail with smtproutes on one machine can resolv
the problem of the e-mail.

You can probably use even postfix on the first machine and then reroute the
destinations using the private IP'S

With postfix use transport
/etc/postfix/transport:
example.com smtp:[inside-gateway.example.com]

Diaolin
 
Hi all,
I have a question which bothers me from some time. Is it possible to have multiple VPS / with different internal IP's / every to have a mail server and apache with vhosts behind a router distro with 1 public IP?

No it's not possible for mail. You can only run one mail service on a public ip address. What you can do is to designate one mail server for every domain, then smarthost/forward all mail to their destination VPS mail server based on domains.

Apache may be possible, but not trivial. You have to catch all port 80 traffic, and based on the HTTP headers (site name) select the corresponding VPS.
 
Someone wants to enter a site on my server. He connects to the router/firewall, then he is redirected to the name server /10.10.10.13 / which resolves the public ip /93.152.164.179/, then back to the router and then to 10.10.10.2 which is the reverse proxy and afterwards to the 10.10.10.3 which is the server with the site on it? Is this how it works?
 

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!