Networking Forums

Networking Forums > Computer Networking > Linux Networking > DNAT and load-balancing using iptables

Reply
Thread Tools Display Modes

DNAT and load-balancing using iptables

 
 
Pawel Niewiadomski
Guest
Posts: n/a

 
      11-11-2004, 07:42 PM
I am experimenting with iptables on a virtual network set up on VMWare. The
NAT box is running Knoppix 3.6 (2.6 kernel). Everything works fine, except
I cannot get the NAT-box to distribute HTTP packets between two HTTP
servers which are set up on a private network. All the packets go to the
first server from the range (172.16.0.2). I have used the following command
to set up DNAT
iptables -t nat -A PREROUTING -p tcp --dport 80 -j DNAT --to 172.16.0.2-
172.16.0.3
I have been looking around for a while and some sources said that iptables
actually does not do load balancing, although the HOWTO claims it does. I
have also found a complicated solution to this problem using additional
modules, but I would like to keep things as simple as possible.
Thanks for any suggestions or sources where I could find the necessary
information.
Pawel Niewiadomski
 
Reply With Quote
 
 
 
 
Pawel Niewiadomski
Guest
Posts: n/a

 
      11-11-2004, 10:36 PM
> I am experimenting with iptables on a virtual network set up on
> VMWare. The NAT box is running Knoppix 3.6 (2.6 kernel). Everything
> works fine, except I cannot get the NAT-box to distribute HTTP packets
> between two HTTP servers which are set up on a private network. All
> the packets go to the first server from the range (172.16.0.2). I have
> used the following command to set up DNAT
> iptables -t nat -A PREROUTING -p tcp --dport 80 -j DNAT --to
> 172.16.0.2- 172.16.0.3
> I have been looking around for a while and some sources said that
> iptables actually does not do load balancing, although the HOWTO
> claims it does. I have also found a complicated solution to this
> problem using additional modules, but I would like to keep things as
> simple as possible. Thanks for any suggestions or sources where I
> could find the necessary information.
> Pawel Niewiadomski
>


I have re-tested it and it does actually work. You just need to refresh
really fast to see the effect... Sorry for that previous post...
 
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
iptables load balancing using "nth" jessica6 Linux Networking 1 02-05-2008 05:14 PM
iptables, DNAT, and SMTP Brandon Linux Networking 6 03-11-2007 05:55 PM
Iptables {DNAT,REDIRECT} Akede Linux Networking 1 10-07-2004 03:06 AM
iptables DNAT question Claudio Nieder Linux Networking 2 11-21-2003 07:51 PM
Iptables, Cisco 677, DNAT Eugene van Rooyen Linux Networking 0 08-10-2003 10:57 AM



1 2 3 4 5 6 7 8 9 10 11