Subject: kern/11196: ipnat does not allow rdr on different ports to same host
To: None <gnats-bugs@gnats.netbsd.org>
From: Martin J. Laubach <mjl@emsi.priv.at>
List: netbsd-bugs
Date: 10/11/2000 19:37:16
>Number:         11196
>Category:       kern
>Synopsis:       ipnat does not allow rdr on different ports to same host
>Confidential:   no
>Severity:       serious
>Priority:       high
>Responsible:    kern-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Wed Oct 11 19:37:00 PDT 2000
>Closed-Date:
>Last-Modified:
>Originator:     Martin J. Laubach
>Release:        1.5_ALPHA2
>Organization:
>Environment:
NetBSD maschndrohtzaun.emsi.priv.at 1.5_ALPHA2 NetBSD 1.5_ALPHA2 (HEDGE) #9: Thu Aug 31 20:32:08 CEST 2000     mjl@xxx.at:/home/users/mjl/netbsd/src/sys/arch/i386/compile/HEDGE i386


>Description:

  ipnat does not allow redirects to the same host for different
ports, even though that ISTR worked in 1.4 and /usr/share/examples/ipf
contains such configurations. Thus I assume it's a bug in the "is
the rule already present"-check.

>How-To-Repeat:

  Have an ipnat.conf listing:

	rdr ne0 1.3.5.7/32 port 22 -> 192.168.8.9 port 22 tcp
	rdr ne0 1.3.5.7/32 port 5703 -> 192.168.8.9 port 5703 tcp

  Then do:

maschndrohtzaun# /usr/sbin/ipnat -FCvf /etc/ipnat.conf
0 entries flushed from NAT table
7 entries flushed from NAT list
rdr ne0 1.3.5.7/32 port 22 -> 192.168.8.9 port 22 tcp
rdr ne0 1.3.5.7/32 port 5703 -> 192.168.8.9 port 5703 tcp
ioctl(SIOCADNAT): File exists

>Fix:
>Release-Note:
>Audit-Trail:
>Unformatted: