* -SOLVED- Re: How to do PAT based on source IP adress and port ?
[not found] <AANLkTik_lOU6fbe13Rh4AQi44CFFaCCGgjT_vR4PEdMg@mail.gmail.com>
@ 2010-07-18 4:04 ` Thomas Elsgaard
0 siblings, 0 replies; only message in thread
From: Thomas Elsgaard @ 2010-07-18 4:04 UTC (permalink / raw)
To: netfilter
On Sun, Jul 18, 2010 at 1:57 AM, Thomas Elsgaard
<thomas.elsgaard@gmail.com> wrote:
> I am wondering how i can get iptables to do a PAT based on source IP
> address?
> Traffic from 10.5.1.0/24 towards UDP port 69 should be mapped to port
> 20000 instead of port 69
> Traffic from 10.5.2.0/24 towards UDP port 69 should be mapped to port
> 20001 instead of port 69
> Is this possible with iptables?
>
> -----------------------------------------
>
Hi everybody
After some work, i managed to get it working...
The solution was very simple:
iptables -t nat -A PREROUTING -i eth0 --source 10.5.1.0/24 -p udp --dport
69 -j REDIRECT --to-port 20001
iptables -t nat -A PREROUTING -i eth0 --source 10.5.2.0/24 -p udp --dport 69
-j REDIRECT --to-port 20002
Thanks for the advices
Thomas
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2010-07-18 4:04 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <AANLkTik_lOU6fbe13Rh4AQi44CFFaCCGgjT_vR4PEdMg@mail.gmail.com>
2010-07-18 4:04 ` -SOLVED- Re: How to do PAT based on source IP adress and port ? Thomas Elsgaard
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.