Port fowarding and load balancer in ubuntu server 12.04
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
23k1975137
23k1975137
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 |
Your Answer
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "106"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
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
Required, but never shown
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
Required, but never shown
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
xulsitatirev
50917
50917
add a comment |
add a comment |
Thanks for contributing an answer to Unix & Linux Stack Exchange!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Some of your past answers have not been well-received, and you're in danger of being blocked from answering.
Please pay close attention to the following guidance:
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
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
Required, but never shown
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
Required, but never shown
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
Required, but never shown
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
Required, but never shown
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
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
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