NetBSD-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: NPF port forward



On 19 January 2013 02:49, Mindaugas Rasiukevicius <rmind%netbsd.org@localhost> 
wrote:
>
> When the additional "pass <...>" filter criteria is used, it means you
> are going to specify the criteria explicitly, therefore NPF will not do
> that for you implicitly and the segment on the right-hand side is actually
> ignored.
>
> Try:
>
> map pcn0 dynamic 127.0.0.1 port 3890 <- 0.0.0.0 \
>     pass from 10.0.0.53 to $rdr_ip port 389
>
Yes, that works perfectly thank you.

So to test my understanding, looking back at my original rule:
map pcn0 dynamic 127.0.0.1 port 3890 <- pcn0 pass from 10.0.0.53 port 389
on the right-hand-side pcn0 is ignored (because a pass <...> block
follows), it would then match packets with a _source_ IP:port of
10.0.0.53:389 and _any_ destination IP:port (because the 'to'
specification was omitted).

Will


Home | Main Index | Thread Index | Old Index