Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 7 Dec 1999 16:51:28 -0800
From:      "James Webster" <james3838@tsi-net.com>
To:        "Chameleon" <swen@wavefire.com>, <freebsd-questions@freebsd.org>
Subject:   Re: Problems with NATD
Message-ID:  <021c01bf4116$6fb21150$41586b83@mins05>
References:  <3.0.32.19991207091837.0195da10@mail.wavefire.com>

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

[-- Attachment #1 --]
Did some more digging and found a problem, but don't know the solution -
/sbin/ipfw add divert natd all from any to any via ex0
0000 divert 868 ip from any to any via ex0
ip_fw_ctl: invalid command
ipfw: setsockopt(IP_FW_ADD): Invalid argument


  ----- Original Message ----- 
  From: Chameleon 
  To: James Webster ; freebsd-questions@FreeBSD.ORG 
  Sent: Tuesday, December 07, 1999 9:18 AM
  Subject: Re: Problems with NATD


  At 09:02 PM 12/6/99 -0800, James Webster wrote:
  >I'm a first time user of FreeBSD ( my NIC card wouldn't work with netBSD for
  >some reason). While I'm familiar with networking, and network address
  >translation, so some reason I can't get it working on FreeBSD.
  >
  >I'm setting up a weird testing topology to simulate a slow link (serial), so
  >I have a box with an Ethernet card (fixed IP 172.30.224.9) and a PPP
  >(10.0.0.1) connection. I want all connections going to the Ethernet address
  >to be redirected to the machine on the other side of the PPP (10.0.0.2)
  >connection. I have everything working but the redirection.
  >
  >I have used "/sbin/natd -n ex0 -redirect_port tcp 10.0.0.2:80 80" and "-n
  >ex0 -f /etc/natd.conf" with "redirect_port tcp 10.0.0.2:80 80" in the conf
  >file. Neither has worked for me.
  >
  >If I've some how misread the man pages, please feel free to let me know what
  >I'm doing wrong. I'm not on this mailing list, so please include me in any
  >response.
  >
  >Thanks,
  >James Webster
  >
  Been through all this myself last week...

  in the natd.conf try:

  redirect_port tcp 10.0.0.2:80 172.30.224.9:80

  that should do it... seems to work for me at least.
  Cheers, Swen
  Windows 98: n.
  useless extension to a minor patch release for 
  32-bit extensions and a graphical shell for a 
  16-bit patch to an 8-bit operating system 
  originally coded for a 4-bit microprocessor, 
  written by a 2-bit company that can't stand for
  1 bit of competition. 

[-- Attachment #2 --]
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META content="text/html; charset=iso-8859-1" http-equiv=Content-Type>
<META content="MSHTML 5.00.2919.3800" name=GENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#ffffff>
<DIV><FONT face=Arial size=2>Did some more digging and found a problem, but 
don't know the solution -<BR>/sbin/ipfw add divert natd all from any to any via 
ex0<BR>0000 divert 868 ip from any to any via ex0<BR>ip_fw_ctl: invalid 
command<BR>ipfw: setsockopt(IP_FW_ADD): Invalid argument<BR><BR></FONT></DIV>
<BLOCKQUOTE 
style="BORDER-LEFT: #000000 2px solid; MARGIN-LEFT: 5px; MARGIN-RIGHT: 0px; PADDING-LEFT: 5px; PADDING-RIGHT: 0px">
  <DIV style="FONT: 10pt arial">----- Original Message ----- </DIV>
  <DIV 
  style="BACKGROUND: #e4e4e4; FONT: 10pt arial; font-color: black"><B>From:</B> 
  <A href="mailto:swen@wavefire.com" title=swen@wavefire.com>Chameleon</A> 
</DIV>
  <DIV style="FONT: 10pt arial"><B>To:</B> <A 
  href="mailto:James3838@tsi-net.com" title=James3838@tsi-net.com>James 
  Webster</A> ; <A href="mailto:freebsd-questions@FreeBSD.ORG" 
  title=freebsd-questions@FreeBSD.ORG>freebsd-questions@FreeBSD.ORG</A> </DIV>
  <DIV style="FONT: 10pt arial"><B>Sent:</B> Tuesday, December 07, 1999 9:18 
  AM</DIV>
  <DIV style="FONT: 10pt arial"><B>Subject:</B> Re: Problems with NATD</DIV>
  <DIV><BR></DIV>At 09:02 PM 12/6/99 -0800, James Webster wrote:<BR>&gt;I'm a 
  first time user of FreeBSD ( my NIC card wouldn't work with netBSD 
  for<BR>&gt;some reason). While I'm familiar with networking, and network 
  address<BR>&gt;translation, so some reason I can't get it working on 
  FreeBSD.<BR>&gt;<BR>&gt;I'm setting up a weird testing topology to simulate a 
  slow link (serial), so<BR>&gt;I have a box with an Ethernet card (fixed IP 
  172.30.224.9) and a PPP<BR>&gt;(10.0.0.1) connection. I want all connections 
  going to the Ethernet address<BR>&gt;to be redirected to the machine on the 
  other side of the PPP (10.0.0.2)<BR>&gt;connection. I have everything working 
  but the redirection.<BR>&gt;<BR>&gt;I have used "/sbin/natd -n ex0 
  -redirect_port tcp 10.0.0.2:80 80" and "-n<BR>&gt;ex0 -f /etc/natd.conf" with 
  "redirect_port tcp 10.0.0.2:80 80" in the conf<BR>&gt;file. Neither has worked 
  for me.<BR>&gt;<BR>&gt;If I've some how misread the man pages, please feel 
  free to let me know what<BR>&gt;I'm doing wrong. I'm not on this mailing list, 
  so please include me in 
  any<BR>&gt;response.<BR>&gt;<BR>&gt;Thanks,<BR>&gt;James 
  Webster<BR>&gt;<BR>Been through all this myself last week...<BR><BR>in the 
  natd.conf try:<BR><BR>redirect_port tcp 10.0.0.2:80 
  172.30.224.9:80<BR><BR>that should do it... seems to work for me at 
  least.<BR>Cheers, Swen<BR><B>Windows 98</B>: n.<BR>useless extension to a 
  minor patch release for <BR>32-bit extensions and a graphical shell for a 
  <BR>16-bit patch to an 8-bit operating system <BR>originally coded for a 4-bit 
  microprocessor, <BR>written by a 2-bit company that can't stand for<BR>1 bit 
  of competition. </BLOCKQUOTE></BODY></HTML>

Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?021c01bf4116$6fb21150$41586b83>