From owner-freebsd-questions Fri Nov 22 4:14:50 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 BDDC437B401 for ; Fri, 22 Nov 2002 04:14:49 -0800 (PST) Received: from c014.snv.cp.net (h001.c014.snv.cp.net [209.228.35.75]) by mx1.FreeBSD.org (Postfix) with SMTP id 4671943E91 for ; Fri, 22 Nov 2002 04:14:49 -0800 (PST) (envelope-from klimenta@futurebit.com) Received: (cpmta 4790 invoked from network); 22 Nov 2002 04:14:43 -0800 Received: from 138.89.118.66 (HELO bigbeat) by smtp.cswebmail.com (209.228.35.75) with SMTP; 22 Nov 2002 04:14:43 -0800 X-Sent: 22 Nov 2002 12:14:43 GMT Message-ID: <002501c29221$7bdd9350$0300a8c0@futurebit.local> From: "Kliment Andreev" To: "Marco Radzinschi" , "Shvetima Gulati" Cc: References: <20021121225635.R6565-100000@radzinschi.com> Subject: Re: port forwarding Date: Fri, 22 Nov 2002 07:19:54 -0500 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-5" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2800.1106 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106 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 > > What is the easiest way of forwarding a port in FreeBSD. Suppose I want > > my server to listen on port 8280, but want all connection attempts to port > > 80 to be forwarded to this port ... can that be done? Put this in /etc/ipnat.rules rdr dc0 0/0 port 80 -> 127.0.0.1 port 8280 tcp And this in /etc/rc.conf ipfilter_enable="YES" ipnat_enable="YES" ipmon_enable="YES" ipfs_enable="YES" I am using similar configuration for squid. But remember to check the documentation first. Here is a great article http://www.defcon1.org/~ghostrdr/FreeBSD-STABLE_and_IPFILTER.html To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message