NetBSD Problem Report #10492

Received: (qmail 20126 invoked from network); 2 Jul 2000 05:47:47 -0000
Message-Id: <200007020547.e625lfB01401@gateway.tuug.net>
Date: Sun, 2 Jul 2000 14:47:43 +0900 (JST)
From: wileyc@tuug.net
Reply-To: wileyc@tuug.net
To: gnats-bugs@gnats.netbsd.org
Subject: ipnat multiple port redirects broken in 1.5_ALPHA
X-Send-Pr-Version: 3.95

>Number:         10492
>Category:       kern
>Synopsis:       ipnat multiple port redirects broken in 1.5_ALPHA
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    darrenr
>State:          closed
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sun Jul 02 05:48:00 +0000 2000
>Closed-Date:    Mon Sep 18 11:16:58 +0000 2000
>Last-Modified:  Mon Sep 18 11:16:58 +0000 2000
>Originator:     Christopher SEKIYA
>Release:        20000630
>Organization:
tuug.net
>Environment:

System: NetBSD gateway 1.5_ALPHA NetBSD 1.5_ALPHA (GATEWAY) #0: Fri Jun 30 20:18:37 JST 2000 wileyc@gateway:/usr/src/sys/arch/i386/compile/GATEWAY i386


>Description:
With 1.4X, I could redirect two or more ports from the NAT box's external       
interface to a box on the private network by doing this:                        

        rdr ep0 0.0.0.0/0 port 80 -> 192.168.10.8 port 80 tcp                   
        rdr ep0 0.0.0.0/0 port 25 -> 192.168.10.8 port 25 tcp                   

With 1.5_ALPHA, the first redirect works, but all subsequent redirects with     
that external/internal IP pair (no matter what the port pair may be) fail with  
an EEXIST.                                                                      
>How-To-Repeat:
echo "rdr ep0 0.0.0.0/0 port 80 -> 192.168.10.8 port 80 tcp" | ipnat -f -
echo "rdr ep0 0.0.0.0/0 port 25 -> 192.168.10.8 port 25 tcp" | ipnat -f -
>Fix:
Add unique port check to sys/netinet/ip_nat.c around line 428?
>Release-Note:
>Audit-Trail:

From: woods@weird.com (Greg A. Woods)
To: gnats-bugs@gnats.netbsd.org (NetBSD GNATS submissions and followups)
Cc:  
Subject: Re: kern/10492: ipnat multiple port redirects broken in 1.5_ALPHA
Date: Sun,  2 Jul 2000 22:19:34 -0400 (EDT)

 [ On Sunday, July 2, 2000 at 14:47:43 (+0900), wileyc@tuug.net wrote: ]
 > Subject: kern/10492: ipnat multiple port redirects broken in 1.5_ALPHA
 >
 > With 1.4X, I could redirect two or more ports from the NAT box's external       
 > interface to a box on the private network by doing this:                        
 >                                                                                 
 >         rdr ep0 0.0.0.0/0 port 80 -> 192.168.10.8 port 80 tcp                   
 >         rdr ep0 0.0.0.0/0 port 25 -> 192.168.10.8 port 25 tcp                   
 >                                                                                 
 > With 1.5_ALPHA, the first redirect works, but all subsequent redirects with     
 > that external/internal IP pair (no matter what the port pair may be) fail with  
 > an EEXIST.                                                                      

 Whew!  I thought it was just me!

 I can confirm this problem on i386 on 1.4ZD and 1.5A.

 -- 
 							Greg A. Woods

 +1 416 218-0098      VE3TCP      <gwoods@acm.org>      <robohack!woods>
 Planix, Inc. <woods@planix.com>; Secrets of the Weird <woods@weird.com>
State-Changed-From-To: open->suspended 
State-Changed-By: darrenr 
State-Changed-When: Sun Sep 17 00:06:30 PDT 2000 
State-Changed-Why:  
this is a known problem and has been fixed in later releases of ipfilter. 
updating netbsd should incorporate the fix for you. 


Responsible-Changed-From-To: kern-bug-people->darrenr 
Responsible-Changed-By: darrenr 
Responsible-Changed-When: Sun Sep 17 00:06:30 PDT 2000 
Responsible-Changed-Why:  
darrenr is responsible for ipf 
State-Changed-From-To: suspended->closed 
State-Changed-By: darrenr 
State-Changed-When: Mon Sep 18 04:16:39 PDT 2000 
State-Changed-Why:  
user said it was ok to close 
>Unformatted:

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.51 2026/08/10 02:28:17 riastradh Exp $
$NetBSD: gnats_config.sh,v 1.10 2026/05/13 22:00:09 riastradh Exp $
Copyright © 1994-2026 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.