Date: Thu, 27 Dec 2001 01:32:39 -0800 (PST) From: Julian Elischer <julian@elischer.org> To: "Crist J . Clark" <cjc@FreeBSD.ORG> Cc: Henry Su <henrysu@nttmcl.com>, freebsd-net@FreeBSD.ORG Subject: Re: socket call in the kernel Message-ID: <Pine.BSF.4.21.0112270131110.85465-100000@InterJet.elischer.org> In-Reply-To: <20011227012855.F2090@blossom.cjclark.org>
next in thread | previous in thread | raw e-mail | index | archive | help
yes, but there is no need to change the packet.. fwd will do exactly what he wants as soon as I can get the network topology worked out :-) On Thu, 27 Dec 2001, Crist J . Clark wrote: > On Thu, Dec 27, 2001 at 01:04:25AM -0800, Henry Su wrote: > > Yes, it works: > > > > [00:52:58][root@test2:~]$ telnet 127.0.0.1 8800 > > Trying 127.0.0.1... > > Connected to localhost. > > Escape character is '^]'. > > 12334 > > > > HTTP/1.1 302 Moved > > Date: Thu, 27 Dec 2001 00:53:18 PST > > Location: https://216.69.69.254/cgi-bin/login > > 0 > > > > > > Connection closed by foreign host. > > > > > > I found the problem is that the ipfw forwarding does not change the dst ip > > address, so that my redirection socket server can not read these > > fwd packet (since the dst ip is not correct). The solution can be change > > the ip_fw.c to modify dst ip address for the forwarding packet, but I do > > not know how to do it. It has next_hop for fwd. I do not know how to do > > packet manupunation in ip_fw.c's chk func. > > That's what I figured your problem was, but I never got around to > asking for you to check it. > > 'fwd' rules _deliberately_ do not actually modify any data in the > packet. You are looking for something more like NAT. natd(8) may be > overkill for your needs. There are other, more lightweight TCP > forwarders in the ports collection. > -- > "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?Pine.BSF.4.21.0112270131110.85465-100000>