Date: Sun, 16 Dec 2001 19:04:39 -0800 From: "Crist J . Clark" <cjc@FreeBSD.ORG> To: =?iso-8859-1?Q?Boris_K=F6ster_?= <koester@x-itec.de> Cc: freebsd-net@FreeBSD.ORG Subject: Re: nat / ipdivert problem - if possible please help Message-ID: <20011216190439.B15624@blossom.cjclark.org> In-Reply-To: <3C1D1186.26005.1F1D48@localhost>; from koester@x-itec.de on Sun, Dec 16, 2001 at 09:26:30PM %2B0100 References: <3C1D1186.26005.1F1D48@localhost>
next in thread | previous in thread | raw e-mail | index | archive | help
On Sun, Dec 16, 2001 at 09:26:30PM +0100, Boris Köster wrote:
> I have a problem.
>
> hope# uname -a
> FreeBSD hope.hope 4.4-STABLE FreeBSD 4.4-STABLE #2: Fri Dec 14 14:59:52 CET
> 2006 (???)
>
> I have a BSD laptop on 192.168.0.3
>
> I have a BSD server 192.168.0.99
>
> I have a win2k server at 192.168.0.1
>
> I want to route telnet service on .99 to .3
> that means if you telnet from .1 to .99 the laptop answers on 3
>
> This feature requires ipfw/natd and I have made a kernel for this (IPFIREWALL,
> IPDIVERT)
>
> I don´t know how to continue, i tried this on the bsd server:
>
> /sbin/ipfw -f flush
> /sbin/ipfw add divert natd all from any to any via ed0
> /sbin/ipfw add pass all from any to any
> natd -interface ed0 -redirect_port tcp 192.168.0.3:telnet 192.168.0.99:telnet
>
> But without success.
The problem I see is this,
1) The Win2k machine tries to initiate a connection to the BSD
server,
192.168.0.1 -> 192.168.0.99 SYN
2) The BSD server rewrites the packet and sends its on its way,
192.168.0.1 -> 192.168.0.3 SYN
3) The BSD laptop gets the packet and sends back a response,
192.168.0.3 -> 192.168.0.1 SYN-ACK
4) The Win2k machine receives the packet, but since it hasn't tried
to initiate a connection to 192.168.0.3,
192.168.0.1 -> 192.168.0.3 RST
See the problem now?
--
"It's always funny until someone gets hurt. Then it's hilarious."
Crist J. Clark | cjclark@alum.mit.edu
| cjclark@jhu.edu
http://people.freebsd.org/~cjc/ | cjc@freebsd.org
To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-net" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20011216190439.B15624>
