On Tue, Aug 26, 2003 at 12:31:24PM -0400, J. Sabino wrote: > Is there a shorter way to do 1 to 1 RDR? Consider the following: > > rdr on $ext proto tcp from any to $ip port 24099 -> 192.168.1.20 port 24099 > rdr on $ext proto tcp from any to $ip port 24100 -> 192.168.1.20 port 24100 > rdr on $ext proto tcp from any to $ip port 24101 -> 192.168.1.20 port 24101 > rdr on $ext proto tcp from any to $ip port 24102 -> 192.168.1.20 port 24102 > rdr on $ext proto tcp from any to $ip port 24103 -> 192.168.1.20 port 24103 > rdr on $ext proto tcp from any to $ip port 24104 -> 192.168.1.20 port 24104 > rdr on $ext proto tcp from any to $ip port 24105 -> 192.168.1.20 port 24105 > rdr on $ext proto tcp from any to $ip port 24106 -> 192.168.1.20 port 24106 > rdr on $ext proto tcp from any to $ip port 24107 -> 192.168.1.20 port 24107 > > I would like to get this down to 1 rule if possible. >
am i on crack or is this in the manpage? --------- rdr The packet is redirected to another destination and possibly a dif- ferent port. rdr rules can optionally specify port ranges instead of single ports. rdr ... port 2000:2999 -> ... port 4000 redirects ports 2000 to 2999 (inclusive) to port 4000. rdr ... port 2000:2999 -> ... port 4000:* redirects port 2000 to 4000, 2001 to 4001, ..., 2999 to 4999. --------- ergo: rdr on $ext inet proto tcp from any to $ip port 24099:24107 -> 192.168.1.20 port 24099:* -- [ openbsd 3.4-beta GENERIC ( aug 24 ) // i386 ]