Bandwidth Limiting select WAN IP Blocks
First of all I appreciate your taking the time to read this.
Ok the situtation is this, I have a Debian based Server w/ a 100Mbps Dedicated Line and 4 WAN IP Address's.
I need to make the server differentiate between incoming connections from one or more specific WAN Netblocks, and then limit the transfer speed of the data transfer between my server and servers within the specified netblocks, while leaving all incoming connections from outside the netblocks un-throttled.
My thought was to create 1 virtual NIC (eth:1) and have the usual NIC (eth0). For instance assigned the following IP Address's
eth0 204.110.86.162
eth0:1 204.110.86.163
Then telling iptables to DNAT all (eth0) incoming connections (sourced within the specific netblocks) to the virtual NIC (eth0:1).
The virtual adapter (eth0:1) having a permanent bandwidth cap of 20Mbps.
It would then think that the rerouted connection would pass only through adapter (eth0:1) and be limited.
Am I totally off base here? I have looked online and read various "Bandwidth Limiting How To"s but nothing seems like quite what I need.
I do have a good amount of linux experience (CLI and GUI).
Any help is greatly appreciated. Thanks
|