Re: Port forwarding question

Randy Beaudreault <[email protected]> Wed, 8 Jul 2009 18:48:57 -0700
Newsgroups gmane.comp.security.firewalls.ipfilter
Message-ID <26267_1247104163_4A554CA3_26267_1618_1_E7D43D26-D797-4089-BD0D-0DEFCC965E12@pacbell.net>
On Jul 8, 2009, at 2:57 PM, Erich Weiler wrote:

> Hey all-
>
> I've got a very specific port forwarding setup I'd like to  
> implement, but I can't seem to find the exact syntax to do it.  I'm  
> on OpenSolaris.
>
> What I want to do is achieved by NAT I think.  I need a rule such  
> that:
>
> If a TCP packet comes in with a SOURCE IP of 10.1.1.1 and a  
> DESTINATION port of 22
>
> Then..
>
> Forward it to 192.168.1.1 on port 1000
>
> ??
>
> I see the rdr directive, but it doesn't seem to allow for specifying  
> a 'source' IP address and 'destination' port in packet matching  
> portion of the rule, it looks like the end of the rule should be "->  
> 192.168.1.1 port 1000" I think...
>
> Quickly browsed the archives but couldn't find this, nor could I  
> find an example in the documentation...  Any hints?
>
> Thanks!

Erich,

Use redirect for this:

rdr (<interface> if needed) 10.1.1.1/32 port 22 -> 192.168.1.1 port 100

--
Randy

OS X - UNIX for the rest of us
NetBSD - It's Explosive!
Marten - Prograph for OS X.  Yes!