Results 1 to 3 of 3
Hello, I have a really strange set up here am hoping some expert could help mw with I am hoping to set up a Gateway for a set of private ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
- 08-10-2008 #1
- Join Date
- Aug 2008
Really Strange Nat GW help?
I have a really strange set up here am hoping some expert could help mw with
I am hoping to set up a Gateway for a set of private subnets which I want to nat on to a set of public ip's, one public ip per network, all on one public interface.
So here is my setup
Public Interface -
Eth0:- IP 192.168.0.2 - 192.168.0.6
Private Subnets -
Eth1:- IP 192.168.100.1
Eth2:- IP 192.168.100.1
Eth3:- IP 192.168.100.1
Eth4:- IP 192.168.100.1
Eth5:- IP 192.168.100.1
Now this is the strange one I have one public interface which I want to have 5 ips on. I was hoping that for each of these ips, I could nat and tie and give its sole use to only one private subnet. So
Eth1 would go out eth0 with 192.168.0.2
Eth2 would go out eth0 with 192.168.0.3
Now this is where it gets stranger, Each of the private subnets need to have the same ip address so machine can be moved between the subnets without seeing any ip gateway changed :S
Is this possible to achive with ip tables? I was thinking of IP Aliasas on Eth0 but I heard they are not supported by iptables.....
Any Help would be greatly appriciated!
- 08-10-2008 #2
iptables -A POSTROUTING -o eth0 -s <private address1> -j SNAT <public address1> iptables -A POSTROUTING -o eth0 -s <private address2> -j SNAT <public address2> iptables -A POSTROUTING -o eth0 -s <private address3> -j SNAT <public address3>
You are still going to need to setup your sub-interfaces
The adventure of a life time.
Linux User #296285
- 08-14-2008 #3"Really, I'm not out to destroy Microsoft. That will just be a completely unintentional side effect." Linus Benedict Torvalds