* Multiple port-fwd on same port based on src IP
@ 2006-09-20 18:38 Oliver Schulze L.
2006-09-20 18:59 ` Rob Sterenborg
0 siblings, 1 reply; 3+ messages in thread
From: Oliver Schulze L. @ 2006-09-20 18:38 UTC (permalink / raw)
To: netfilter
Hi,
I wonder if I can use multiple port forwarding rules to the same IP/Port
based
on the src IP and forwarding to different internal IPs
It should be something like this:
iptables -t nat -A PREROUTING -p tcp -s CLIENT1_IP -d INET_IP --dport
1234 -j DNAT --to 192.168.1.1:1234
iptables -t nat -A PREROUTING -p tcp -s CLIENT2_IP -d INET_IP --dport
1234 -j DNAT --to 192.168.1.2:1234
iptables -t nat -A PREROUTING -p tcp -s CLIENT3_IP -d INET_IP --dport
1234 -j DNAT --to 192.168.1.3:1234
...
Will it work? Or should I configure some sort of tcp proxy.?
Thanks
Oliver
--
Oliver Schulze L.
Get my e-mail after a captcha test in: http://tinymailto.com/oliver
^ permalink raw reply [flat|nested] 3+ messages in thread
* RE: Multiple port-fwd on same port based on src IP
2006-09-20 18:38 Multiple port-fwd on same port based on src IP Oliver Schulze L.
@ 2006-09-20 18:59 ` Rob Sterenborg
2006-09-20 19:18 ` Oliver Schulze L.
0 siblings, 1 reply; 3+ messages in thread
From: Rob Sterenborg @ 2006-09-20 18:59 UTC (permalink / raw)
To: Netfilter
> Hi,
> I wonder if I can use multiple port forwarding rules to the
> same IP/Port based on the src IP and forwarding to different
> internal IPs
>
> It should be something like this:
> iptables -t nat -A PREROUTING -p tcp -s CLIENT1_IP -d INET_IP --dport
> 1234 -j DNAT --to 192.168.1.1:1234
> iptables -t nat -A PREROUTING -p tcp -s CLIENT2_IP -d INET_IP --dport
> 1234 -j DNAT --to 192.168.1.2:1234
> iptables -t nat -A PREROUTING -p tcp -s CLIENT3_IP -d INET_IP --dport
> 1234 -j DNAT --to 192.168.1.3:1234
> ...
>
> Will it work? Or should I configure some sort of tcp proxy.?
I'm not sure why you're using "-d INET_IP" (this box has multiple
INET_IP's?), but IMO this would work (if your FORWARD chain is properly
setup).
Gr,
Rob
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2006-09-20 19:18 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-09-20 18:38 Multiple port-fwd on same port based on src IP Oliver Schulze L.
2006-09-20 18:59 ` Rob Sterenborg
2006-09-20 19:18 ` Oliver Schulze L.
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.