Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 27 Dec 2001 01:28:55 -0800
From:      "Crist J . Clark" <cjc@FreeBSD.ORG>
To:        Henry Su <henrysu@nttmcl.com>
Cc:        Julian Elischer <julian@elischer.org>, freebsd-net@FreeBSD.ORG
Subject:   Re: socket call in the kernel
Message-ID:  <20011227012855.F2090@blossom.cjclark.org>
In-Reply-To: <Pine.BSI.4.05L.10112270057590.20316-100000@alicia.nttmcl.com>; from henrysu@nttmcl.com on Thu, Dec 27, 2001 at 01:04:25AM -0800
References:  <Pine.BSF.4.21.0112261925400.84622-100000@InterJet.elischer.org> <Pine.BSI.4.05L.10112270057590.20316-100000@alicia.nttmcl.com>

next in thread | previous in thread | raw e-mail | index | archive | help
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?20011227012855.F2090>