(sorry if this ends up being a duplicate post)

Hi all,

I'm using NetBSD 10.1 as a custom router with NPF sorting the NAT stuff.

I'm trying to configure a port range of say 3000 to 4000. I can do this 
successfully on a per-group basis using a rule such as the following:

pass stateful in final family inet4 proto tcp to $ext_if port 3000-4000

What I can't seem to do is to NAT this port range to another machine on my 
network; 'npfctl validate' spots a syntax error with all of my current attempts.

Here is the latest one:

map $ext_if dynamic proto tcp 192.168.0.6 port 3000-4000 <- $ext_if port 
3000-4000

Here is the validation output from 'npfctl validate':

/etc/npf.conf:27:78: port range is not valid near '4000'

I think npfctl is referencing the second instance of '4000' due to the line and 
character marker.

Can anyone see where I'm going wrong here?

Thanks for your time.


Pete.

Reply via email to