* special SNAT and DNAT gateway
@ 2008-11-13 14:58 patrick daures
2008-11-13 17:14 ` Pascal Hambourg
0 siblings, 1 reply; 2+ messages in thread
From: patrick daures @ 2008-11-13 14:58 UTC (permalink / raw)
To: netfilter
Hello,
I would like to create a gateway in order to do a special kind of NAT.
I need to do SNAT and DNAT in this way :
SNAT :
@src A.X.Y.Z -> A+1.X.Y.Z
Example:
@src 192.168.0.1 -> 193.168.9.1
@src 191.23.33 -> 192.23.33
DNAT :
@dst A.X.Y.Z -> A+1.X.Y.Z
Example:
@dst 168.1.0.1 -> 169.1.0.1
@dst 154.9.2.36> 155.9.2.36
I know how to do it with "static list" of @IP with iptables :
DNAT :
iptables -t nat -A PREROUTING -d 192.168.0.1 -j DNAT --to-destination
193.168.0.1
SNAT
iptables -t nat -A POSTOUTING -s 168.1.0.1 -j DNAT --to-destination 169.1.0.1
But, as I have a large number of @IP, how can I do it for ALL ip addresses ?
Thank you for giving few secondes to explain me how to do it if you
have an answer.
Thank you !
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: special SNAT and DNAT gateway
2008-11-13 14:58 special SNAT and DNAT gateway patrick daures
@ 2008-11-13 17:14 ` Pascal Hambourg
0 siblings, 0 replies; 2+ messages in thread
From: Pascal Hambourg @ 2008-11-13 17:14 UTC (permalink / raw)
To: netfilter
Hello,
patrick daures a écrit :
> I would like to create a gateway in order to do a special kind of NAT.
> I need to do SNAT and DNAT in this way :
>
> SNAT :
> @src A.X.Y.Z -> A+1.X.Y.Z
> Example:
> @src 192.168.0.1 -> 193.168.9.1
> @src 191.23.33 -> 192.23.33
Check the NETMAP target.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2008-11-13 17:14 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-11-13 14:58 special SNAT and DNAT gateway patrick daures
2008-11-13 17:14 ` Pascal Hambourg
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox