Port fowarding and load balancer in ubuntu server 12.04
Clash Royale CLAN TAG#URR8PPP
up vote
4
down vote
favorite
I am looking to create a load balancing server. Essentially here is what I want to do:
I have a public IP address, lets say 1.1.1.1 I have a second public IP address, lets say 2.2.2.2. I have a website, www.f.com point to 1.1.1.1 via an A record. I want that Ubuntu server to forward traffic like this:
- Port 80 traffic is forwarded to 2.2.2.2 on port 60,000 and port 60,001.
- Port 443 traffic is forwaded to 2.2.2.2 on port 60,010 and port 60,011.
- Port 25 traffic is forwared to 2.2.2.2 on port 60,020 and port 60,021
The port forwarding is more important then being able to load balance.
I look forward to some responses. Both server 1.1.1.1 and 2.2.2.2 are both running Ubuntu 12.04 server edition.
iptables port-forwarding load-balancing
add a comment |Â
up vote
4
down vote
favorite
I am looking to create a load balancing server. Essentially here is what I want to do:
I have a public IP address, lets say 1.1.1.1 I have a second public IP address, lets say 2.2.2.2. I have a website, www.f.com point to 1.1.1.1 via an A record. I want that Ubuntu server to forward traffic like this:
- Port 80 traffic is forwarded to 2.2.2.2 on port 60,000 and port 60,001.
- Port 443 traffic is forwaded to 2.2.2.2 on port 60,010 and port 60,011.
- Port 25 traffic is forwared to 2.2.2.2 on port 60,020 and port 60,021
The port forwarding is more important then being able to load balance.
I look forward to some responses. Both server 1.1.1.1 and 2.2.2.2 are both running Ubuntu 12.04 server edition.
iptables port-forwarding load-balancing
1
This seems more like a proxy setup and less of a load balancer...you can useiptables
to do forwarding for you.
â sparticvs
Dec 3 '12 at 4:29
Is it necessary to keep into account whether the destination port is up? If not, iptables DNAT rules should be able to do it...
â Gert van den Berg
Dec 3 '12 at 6:27
using LVS would make more sense here than iptables
â Rui F Ribeiro
Nov 16 '15 at 7:40
add a comment |Â
up vote
4
down vote
favorite
up vote
4
down vote
favorite
I am looking to create a load balancing server. Essentially here is what I want to do:
I have a public IP address, lets say 1.1.1.1 I have a second public IP address, lets say 2.2.2.2. I have a website, www.f.com point to 1.1.1.1 via an A record. I want that Ubuntu server to forward traffic like this:
- Port 80 traffic is forwarded to 2.2.2.2 on port 60,000 and port 60,001.
- Port 443 traffic is forwaded to 2.2.2.2 on port 60,010 and port 60,011.
- Port 25 traffic is forwared to 2.2.2.2 on port 60,020 and port 60,021
The port forwarding is more important then being able to load balance.
I look forward to some responses. Both server 1.1.1.1 and 2.2.2.2 are both running Ubuntu 12.04 server edition.
iptables port-forwarding load-balancing
I am looking to create a load balancing server. Essentially here is what I want to do:
I have a public IP address, lets say 1.1.1.1 I have a second public IP address, lets say 2.2.2.2. I have a website, www.f.com point to 1.1.1.1 via an A record. I want that Ubuntu server to forward traffic like this:
- Port 80 traffic is forwarded to 2.2.2.2 on port 60,000 and port 60,001.
- Port 443 traffic is forwaded to 2.2.2.2 on port 60,010 and port 60,011.
- Port 25 traffic is forwared to 2.2.2.2 on port 60,020 and port 60,021
The port forwarding is more important then being able to load balance.
I look forward to some responses. Both server 1.1.1.1 and 2.2.2.2 are both running Ubuntu 12.04 server edition.
iptables port-forwarding load-balancing
iptables port-forwarding load-balancing
edited Jul 12 '13 at 17:59
Braiam
22.6k1971132
22.6k1971132
asked Dec 3 '12 at 2:32
Matthew St Nicholas Iverson
244
244
1
This seems more like a proxy setup and less of a load balancer...you can useiptables
to do forwarding for you.
â sparticvs
Dec 3 '12 at 4:29
Is it necessary to keep into account whether the destination port is up? If not, iptables DNAT rules should be able to do it...
â Gert van den Berg
Dec 3 '12 at 6:27
using LVS would make more sense here than iptables
â Rui F Ribeiro
Nov 16 '15 at 7:40
add a comment |Â
1
This seems more like a proxy setup and less of a load balancer...you can useiptables
to do forwarding for you.
â sparticvs
Dec 3 '12 at 4:29
Is it necessary to keep into account whether the destination port is up? If not, iptables DNAT rules should be able to do it...
â Gert van den Berg
Dec 3 '12 at 6:27
using LVS would make more sense here than iptables
â Rui F Ribeiro
Nov 16 '15 at 7:40
1
1
This seems more like a proxy setup and less of a load balancer...you can use
iptables
to do forwarding for you.â sparticvs
Dec 3 '12 at 4:29
This seems more like a proxy setup and less of a load balancer...you can use
iptables
to do forwarding for you.â sparticvs
Dec 3 '12 at 4:29
Is it necessary to keep into account whether the destination port is up? If not, iptables DNAT rules should be able to do it...
â Gert van den Berg
Dec 3 '12 at 6:27
Is it necessary to keep into account whether the destination port is up? If not, iptables DNAT rules should be able to do it...
â Gert van den Berg
Dec 3 '12 at 6:27
using LVS would make more sense here than iptables
â Rui F Ribeiro
Nov 16 '15 at 7:40
using LVS would make more sense here than iptables
â Rui F Ribeiro
Nov 16 '15 at 7:40
add a comment |Â
3 Answers
3
active
oldest
votes
up vote
0
down vote
I would recommend Pound (http://www.apsis.ch/pound). It's lightweight, easy to configure, handles https quick and efficient, and does exactly what you want.
add a comment |Â
up vote
0
down vote
If you are looking to load balance data. I might recomend you to use varnish. It is easy to install and set and easy to add nodes later
add a comment |Â
up vote
0
down vote
If you want to serve HTTP
or raw TCP
traffic, HAProxy
might be a good option to you. It satisfies all the conditions you provided above.
References:
- http://www.haproxy.org/
add a comment |Â
3 Answers
3
active
oldest
votes
3 Answers
3
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
0
down vote
I would recommend Pound (http://www.apsis.ch/pound). It's lightweight, easy to configure, handles https quick and efficient, and does exactly what you want.
add a comment |Â
up vote
0
down vote
I would recommend Pound (http://www.apsis.ch/pound). It's lightweight, easy to configure, handles https quick and efficient, and does exactly what you want.
add a comment |Â
up vote
0
down vote
up vote
0
down vote
I would recommend Pound (http://www.apsis.ch/pound). It's lightweight, easy to configure, handles https quick and efficient, and does exactly what you want.
I would recommend Pound (http://www.apsis.ch/pound). It's lightweight, easy to configure, handles https quick and efficient, and does exactly what you want.
answered Dec 3 '12 at 19:25
Doka
614
614
add a comment |Â
add a comment |Â
up vote
0
down vote
If you are looking to load balance data. I might recomend you to use varnish. It is easy to install and set and easy to add nodes later
add a comment |Â
up vote
0
down vote
If you are looking to load balance data. I might recomend you to use varnish. It is easy to install and set and easy to add nodes later
add a comment |Â
up vote
0
down vote
up vote
0
down vote
If you are looking to load balance data. I might recomend you to use varnish. It is easy to install and set and easy to add nodes later
If you are looking to load balance data. I might recomend you to use varnish. It is easy to install and set and easy to add nodes later
answered Jul 15 '15 at 21:15
dSoultanis
1212
1212
add a comment |Â
add a comment |Â
up vote
0
down vote
If you want to serve HTTP
or raw TCP
traffic, HAProxy
might be a good option to you. It satisfies all the conditions you provided above.
References:
- http://www.haproxy.org/
add a comment |Â
up vote
0
down vote
If you want to serve HTTP
or raw TCP
traffic, HAProxy
might be a good option to you. It satisfies all the conditions you provided above.
References:
- http://www.haproxy.org/
add a comment |Â
up vote
0
down vote
up vote
0
down vote
If you want to serve HTTP
or raw TCP
traffic, HAProxy
might be a good option to you. It satisfies all the conditions you provided above.
References:
- http://www.haproxy.org/
If you want to serve HTTP
or raw TCP
traffic, HAProxy
might be a good option to you. It satisfies all the conditions you provided above.
References:
- http://www.haproxy.org/
answered Jan 1 at 11:26
Kamil Zabielski
5097
5097
add a comment |Â
add a comment |Â
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f57419%2fport-fowarding-and-load-balancer-in-ubuntu-server-12-04%23new-answer', 'question_page');
);
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
1
This seems more like a proxy setup and less of a load balancer...you can use
iptables
to do forwarding for you.â sparticvs
Dec 3 '12 at 4:29
Is it necessary to keep into account whether the destination port is up? If not, iptables DNAT rules should be able to do it...
â Gert van den Berg
Dec 3 '12 at 6:27
using LVS would make more sense here than iptables
â Rui F Ribeiro
Nov 16 '15 at 7:40