On 6/16/07 6:28 PM, "Robert LeBlanc" <robert@xxxxxxxxxxxxx> wrote: > I've looked online and can't seem to find a HOW-TO on this. I've > configured iptables to do a many to many NAT, but traffic is not > accepted because the IP address does not exist on the outside interface. > > iptables -t nat -A POSTROUTING -s 192.168.1.0/24 -j SNAT --to 1.2.3.0/25 > > I'm thinking that I need to add a route for this to work, but I'm not > terribly sure. Would something like this work? > > route add -net 1.2.3.0/25 gw 192.168.1.1 > Or > route add -net 1.2.3.0/25 gw 1.2.2.1 > Or > route add -net 1.2.3.0/25 dev eth0 > Where eth0 is the external interface. > > Thanks, > Robert > > Just to follow up on my own post, I did get this to work, I had to add the route for the subnet into the router instead of the linux machine itself. The actual iptables command that used was: Iptables -t nat -A POSTROUTING -s 192.168.1.0/24 -j SNAT --to 1.1.1.2-1.1.1.63 And added the route 1.1.1.2/26 gw 1.1.1.65 Into the cisco router. Robert