From owner-freebsd-questions Sun Jun 30 15:28:42 2002 Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.FreeBSD.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 6892537B401 for ; Sun, 30 Jun 2002 15:28:40 -0700 (PDT) Received: from cody.jharris.com (cody.jharris.com [205.238.128.83]) by mx1.FreeBSD.org (Postfix) with ESMTP id 998E643E0A for ; Sun, 30 Jun 2002 15:28:39 -0700 (PDT) (envelope-from nick@rogness.net) Received: from localhost (nick@localhost) by cody.jharris.com (8.11.1/8.9.3) with ESMTP id g5UMuXC20330; Sun, 30 Jun 2002 17:56:33 -0500 (CDT) (envelope-from nick@rogness.net) Date: Sun, 30 Jun 2002 17:56:33 -0500 (CDT) From: Nick Rogness X-Sender: nick@cody.jharris.com To: Christopher Weimann Cc: freebsd-questions@FreeBSD.ORG Subject: Re: divert/natd/redirect_address/localnet don't get along. In-Reply-To: <20020629231638.A51826@mail.k12us.com> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On Sat, 29 Jun 2002, Christopher Weimann wrote: > I have a webserver setup on a private address and am fowarding port a > public address to it. I have two addresses on dc0 ( public nic ) > one for the firewall itself and the other is forwarded with natd's > redirect_address to the inside server. This works fine for users > outside my network. Inside my network however access to the webserver > ( at its public ip ) results in a connection refused. This seems to > be a problem with my diver rule. > > I have managed to get this to work by adding a second rule like > > /sbin/ipfw add 00050 divert 8668 ip from any to any via dc0 > /sbin/ipfw add 00051 divert 8668 ip from any to any via dc1 > > I don't like this but it works. > > Now I change my browser to go through squid ( running on the firewall > ) and it doesn't work anymore... > > I guess the packets are no longer coming in via either of the > dc interfaces so I drop the via bit altogether and am back > to a single rule. > > /sbin/ipfw add 00050 divert 8668 ip from any to any > > I like this even less AND it doesn't fix the problem... > > Do I have other choices? Yes, run an internal nameserver to tell your internal clients that www.domain.com is on a private IP. This is the standard way to do this and a hell of a lot better than using divert the way you are. Nick Rogness - Don't mind me...I'm just sniffing your packets To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message