From owner-freebsd-questions Sat Sep 23 22:20:43 2000 Delivered-To: freebsd-questions@freebsd.org Received: from gluttony.henshaw.net (gluttony.henshaw.net [63.70.222.4]) by hub.freebsd.org (Postfix) with SMTP id 4EF1A37B422 for ; Sat, 23 Sep 2000 22:20:41 -0700 (PDT) Received: (qmail 77660 invoked from network); 24 Sep 2000 05:20:37 -0000 Received: from dhcp-64-58-25-247.henshaw.net (HELO Ben.henshaw.net) (64.58.25.247) by gluttony.henshaw.net with SMTP; 24 Sep 2000 05:20:37 -0000 Message-Id: <5.0.0.25.2.20000923231412.01f65380@pop.henshaw.net> X-Sender: (Unverified) X-Mailer: QUALCOMM Windows Eudora Version 5.0 Date: Sat, 23 Sep 2000 23:21:43 -0600 To: "Louis Valentine" , From: Ben Schumacher Subject: Re: Routing UDP Packets...? In-Reply-To: <000a01c025b0$92716270$382bd080@louisv> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; format=flowed Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG At 03:49 PM 9/23/2000 -0700, Louis Valentine wrote: > Hey, I'm trying to setup my FreeBSD box with 4.1-RELEASE to act as a > UDP router. I only have one interface, my ethernet card, and what I want > to do is listen for UDP packets on a port, say 20000, and redirect these > packets to some destination, say my.host.com:20000. So far I have: > >1. Recompiled the kernel with the IPFIREWALL and IPDIVERT options. >2. Set firewall_enable=YES, firewall_type=OPEN, gateway_enable=YES, >natd_enable=YES, natd_interface=de0 in rc.conf. >3. Added natd to /etc/services. >3. Started natd with "-redirect_port udp my.host.com:20000 20000 -n de0". > > I have then tried sending a UDP packet to the machine at that port, but > it doesn't seem to be listening properly. I tried running natd with the > -verbose option to debug it, but it never shows any output. Please help! Louis- Trying compiling the kernel with IPFIREWALL_FORWARD instead of IPDIVERT. Then add a firewall rule that forwards the packets. Ex: ipfw add fwd my.host.com,20000 udp from any to local.ip.address 20000 I'm not 100% certain that this will work, but I believe it will. Hope this helps, - Ben Schumacher To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message