From owner-freebsd-questions Mon Jan 14 13:14: 0 2002 Delivered-To: freebsd-questions@freebsd.org Received: from maila.telia.com (maila.telia.com [194.22.194.231]) by hub.freebsd.org (Postfix) with ESMTP id 2FBD337B41F for ; Mon, 14 Jan 2002 13:13:50 -0800 (PST) Received: from d1o887.telia.com (d1o887.telia.com [213.66.164.241]) by maila.telia.com (8.11.6/8.11.6) with ESMTP id g0ELDlI29131 for ; Mon, 14 Jan 2002 22:13:47 +0100 (CET) Received: from telia.com (h228n2fls33o887.telia.com [217.208.230.228]) by d1o887.telia.com (8.10.2/8.10.1) with ESMTP id g0ELBlf15053 for ; Mon, 14 Jan 2002 22:13:47 +0100 (CET) Message-ID: <3C4349D9.8010605@telia.com> Date: Mon, 14 Jan 2002 22:12:57 +0100 From: User Jopet <631pettersson@telia.com> User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:0.9.6) Gecko/20011220 X-Accept-Language: en-us MIME-Version: 1.0 To: questions@FreeBSD.ORG Subject: Re: natd/redirect_port References: <3C4172D5.4050003@telia.com> <20020114141108.B10203@sunbay.com> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit 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 Ruslan Ermilov wrote: >On Sun, Jan 13, 2002 at 12:43:17PM +0100, User Jopet wrote: > >>hello! >> >>I can't get "redirect_port" working in natd, I have read mailing lists, >>doc, etc. But it will not work! >> >>ISP <-----> 217.208.x.x(dc0)-GW-(rl0)192.168.0.1 <------> 192.168.0.2 >> >>natd.conf >>--------- >>interface dc0 >>use_sockets yes >>same_ports yes >>redirect_port tcp 192.168.0.2:22 9999 >> >>And nothing happens when I telnet to 217.208.x.x 9999 >> >>I have also tried "redirect_port tcp 192.168.0.2:22 22" >> >Make sure your kernel was compiled with the IPFIREWALL and >IPDIRVERT options. Also make sure you divert IP traffic to >the natd(8) process. (You didn't tell us how your firewall >rules look like.) > > >Cheers, > I have a small network with 4 computers (2 windows, 1 linux and 1 FreeBSD as gateway). It works fine, apart from I can't get "redirect_port" working. I would like to redirect some traffic from the gateway to the Linux-machine (redirect_port 192.168.0.2:22 9999), but it will not work! kernel.conf ----------------------------------- options IPDIVERT options IPFIREWALL ----------------------------------- ipfw.rules ----------------------------------- ipfw -f flush ipfw add divert natd all from any to any via dc0 ipfw add pass all from any to any ----------------------------------- natd.conf ----------------------------------- redirect_port 192.168.0.2. 22 9999 ----------------------------------- rc.conf ----------------------------------- natd_interface="dc0" natd_enable="YES" natd_flags="-s -f /etc/natd.conf" ----------------------------------- Best regards /Johan To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message