Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 23 Sep 2000 15:49:46 -0700
From:      "Louis Valentine" <bwolf@u.washington.edu>
To:        <freebsd-questions@FreeBSD.ORG>
Subject:   Routing UDP Packets...?
Message-ID:  <000a01c025b0$92716270$382bd080@louisv>

next in thread | raw e-mail | index | archive | help

[-- Attachment #1 --]
  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 Valentine

[-- Attachment #2 --]
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=iso-8859-1">
<META content="MSHTML 5.50.4207.2601" name=GENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#ffffff>
<DIV><FONT face=Arial size=2>&nbsp; Hey, I'm trying to setup my FreeBSD box with 
4.1-RELEASE to act as a UDP router.&nbsp; 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:</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>1. Recompiled the kernel with the IPFIREWALL and 
IPDIVERT options.</FONT></DIV>
<DIV><FONT face=Arial size=2>2. Set firewall_enable=YES, firewall_type=OPEN, 
gateway_enable=YES, natd_enable=YES, natd_interface=de0 in rc.conf.</FONT></DIV>
<DIV><FONT face=Arial size=2>3. Added natd to /etc/services.</FONT></DIV>
<DIV><FONT face=Arial size=2>3. Started natd with "-redirect_port udp 
my.host.com:20000 20000 -n de0".</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>&nbsp; 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!</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>-Louis Valentine</FONT></DIV></BODY></HTML>

Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?000a01c025b0$92716270$382bd080>