multiple separate services behind gateway
Hello!
I,we got 2 servers: one should be gateway and another is a hosting server for some services like web, email, ftp, dns etc.
The thing is every domain is bind on its own ip address.
Lets say, i have 3 internet ip addresses:
domain1: 108.144.4.350
domain2: 108.144.4.351
domain3: 108.144.4.352
I should place all my services behind gateway, separately. I mean every domain is available only on its own ip address.
Thats what i think: On my gateway i place HAProxy to proxying http and https(maybe in the future i'd have to balance traffic) and then im SNAT and DNAT forward:
iptables -A PREROUTING -i eth1 -p 0 -m 0 -o eth0 -d 108.144.4.350 -j DNAT --to-destination 10.10.10.2
10.10.10.2 - is equivalent for domain1, which was 108.144.4.350.
Any suggestions?
Thank you very much!
|