LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 09-29-2006, 06:38 PM   #1
DukeLeto
Member
 
Registered: Jan 2003
Location: Antarctica
Distribution: *watches the penguins pass by*
Posts: 56

Rep: Reputation: 15
Even MORE IPTables headaches!


So I'm now using a machine strictly as the gateway for other machines with a LARGE pool of IP Addresses assigned to this machine, and snat set up using:

Code:
sudo iptables -t nat -A POSTROUTING --protocol tcp --dport 80 -j SNAT --to-source 10.1.2.1-10.1.2.100:80
And round-robin'ed snat works....to a point.

The machines that use this machine as its gateway do actually rotate the source ip, but only from a selection of four ips each machine.

Example:

Machine1 goes to whatismyip.com
Whatismyip.com returns
10.1.2.12 first time.
10.1.2.30 second time.
10.1.2.29 third time.
10.1.2.11 fourth time.

It then rotates randomly through that same set, .12, .30, .29, and .11 over and over, never touching the other 96 ips available.

Machine1 goes to whatismyip.com
Whatismyip.com returns
10.1.2.15 first time.
10.1.2.66 second time.
10.1.2.34 third time.
10.1.2.9 fourth time.

Again, the same behavior is exhibited.

I have several machines, with many ips, and it only rotates through 4 per physical machine, no matter how many are in the iptables --to-source range.

Why does it not round-robin among the ENTIRE range of ips available for snat?


Thanks,
Michael
 
  


Reply



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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
iptables v1.2.9: Unknown arg `/sbin/iptables' Try `iptables -h' or 'iptables --help' Niceman2005 Linux - Security 4 12-29-2005 08:20 PM
X Headaches roc Slackware - Installation 3 07-14-2005 10:53 AM
vpnc headaches... thegreatgatsby Linux - Networking 6 06-16-2005 09:26 PM
QT headaches Pi Man Linux - Software 2 10-16-2004 11:20 PM
Wu-ftp headaches MikeT Linux - Networking 3 01-29-2003 11:20 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 02:11 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration