----- "Nikolaos Milas" nmilas@noa.gr escreveu:
De: "Nikolaos Milas" nmilas@noa.gr Para: "CentOS mailing list" centos@centos.org Enviadas: Quarta-feira, 8 de Janeiro de 2014 6:43:16 (GMT-0300) Auto-Detected Assunto: Re: [CentOS] Forward http traffic
On 7/1/2014 6:19 μμ, Antonio da Silva Martins Junior wrote:
If you put it that way only xxx will receive packets, to balance
betwin both of them
you will need this:
-A PREROUTING -s 10.250.250.0/24 -p tcp -m tcp --dport 8080 -j DNAT --to-destination xxx.xxx.xxx.xxx-yyy.yyy.yyy.yyy:80
Thank you,
According to "man iptables", this defines an inclusive *range*. Yet, I don't want a range, but two (or more) distinct ip addresses. How can this be done?
Humm...
Well, I had only used with a "range". Maybe you can take a look on a software load-balancer, like haproxy, or use something like nginx. Then forward to the load-balancer instead to the servers.
Att.,
Antonio.