[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

linux as loabalance

Posted on 2006-07-06
2
Medium Priority
?
262 Views
Last Modified: 2010-04-20
can linux work as load balance  My company have 2 adsl company connect to in ternet can i PUt  2 adsl company in to one linux box then distribute inter net to 10 computers to computer in my office
0
Comment
Question by:teera
2 Comments
 
LVL 16

Accepted Solution

by:
xDamox earned 900 total points
ID: 17048987
Hi,

Yes Linux can be a load balancer:

if you want to balance the load to the 3 addresses 10.0.0.5, 10.0.0.6 and 10.0.0.7, then you can do as follows :

# iptables -t nat -A POSTROUTING -o eth0 -m nth --counter 7 --every 3 --packet 0 -j SNAT --to-source 10.0.0.5
# iptables -t nat -A POSTROUTING -o eth0 -m nth --counter 7 --every 3 --packet 1 -j SNAT --to-source 10.0.0.6
# iptables -t nat -A POSTROUTING -o eth0 -m nth --counter 7 --every 3 --packet 2 -j SNAT --to-source 10.0.0.7

Of course you need to compile the nth extention module into the iptables.
0
 
LVL 22

Assisted Solution

by:pjedmond
pjedmond earned 900 total points
ID: 17062393
You could also look at a number of the software solutions for this type of thing which would include 'fail-over' etc:

http://lcic.org/load_balancing.html

http://linas.org/linux/load.html

also has some useful info.

(   (()
(`-' _\
 ''  ''
0

Featured Post

Veeam Disaster Recovery in Microsoft Azure

Veeam PN for Microsoft Azure is a FREE solution designed to simplify and automate the setup of a DR site in Microsoft Azure using lightweight software-defined networking. It reduces the complexity of VPN deployments and is designed for businesses of ALL sizes.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Linux users are sometimes dumbfounded by the severe lack of documentation on a topic. Sometimes, the documentation is copious, but other times, you end up with some obscure "it varies depending on your distribution" over and over when searching for …
Often times it's very very easy to extend a volume on a Linux instance in AWS, but impossible to shrink it. I wanted to contribute to the experts-exchange community a way of providing a procedure that works on an AWS instance. It can also be used on…
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.
Suggested Courses
Course of the Month18 days, 15 hours left to enroll

834 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question