From owner-freebsd-hackers Fri Jun 1 3:55:11 2001 Delivered-To: freebsd-hackers@freebsd.org Received: from malmo.trab.se (malmo.trab.se [131.115.48.10]) by hub.freebsd.org (Postfix) with ESMTP id 37F2237B423 for ; Fri, 1 Jun 2001 03:55:07 -0700 (PDT) (envelope-from Urban.E.Olsson@telia.se) Received: from trab-hermes.haninge.trab.se (trab-hermes.haninge.trab.se [131.115.158.15]) by malmo.trab.se (8.10.1/TRAB-primary-2) with ESMTP id f51AsjI12853; Fri, 1 Jun 2001 12:54:46 +0200 (MEST) Received: by trab-hermes.haninge.trab.se with Internet Mail Service (5.5.2448.0) id ; Fri, 1 Jun 2001 12:54:44 +0200 Message-ID: <778DFE9B4E3BD111A74E08002BA3DC0D03DA524A@trab-hermes.haninge.trab.se> From: Urban Olsson To: Bjoern Fischer , Urban Olsson Cc: freebsd-hackers@FreeBSD.ORG Subject: RE: modified FreeBSD gateway Date: Fri, 1 Jun 2001 12:54:43 +0200 MIME-Version: 1.0 X-Mailer: Internet Mail Service (5.5.2448.0) Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: quoted-printable Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG Hi again, What I have done so far is to use the natd daemon as an example but I = have a problem. The divert seems to work but the problem is that I can=B4t get = the packets in my userspace program. Is there some specific port that I = should use for the divert socket? This is not very clear in the natd code. I = can=B4t find where the port is set and if it is a special port reserved for the divert sockets. << Urban > -----Original Message----- > From: Bjoern Fischer [mailto:bfischer@Techfak.Uni-Bielefeld.DE] > Sent: Thursday, May 24, 2001 3:31 PM > To: Urban Olsson > Cc: freebsd-hackers@FreeBSD.ORG > Subject: Re: modified FreeBSD gateway >=20 >=20 > Hello Urban, >=20 > > I have a question regarding modification of a FreeBSD=20 > gateway (the Internet > > gateway for a LAN). What I want to do is to have the=20 > gateway pick up the > > packets, modify the IP-header and resend the packet onto=20 > the network. This > > is a little bit like a NAT but I want to be able to do it=20 > differently and on > > my own terms. I guess that this means that I would be=20 > forced to rewrite the > > gateway source-code so it behaves as I want it to. >=20 > You can do this entirely in userspace. All you need is a=20 > divert socket. > See the manpage divert(4). >=20 > Bj=F6rn Fischer >=20 > --=20 > -----BEGIN GEEK CODE BLOCK----- > GCS d--(+) s++: a- C+++(-) UB++++OSI++++$ P+++(-) L---(++) !E=20 > W- N+ o>+ > K- !w !O !M !V PS++ PE- PGP++ t+++ !5 X++ tv- b+++ D++ G=20 > e+ h-- y+=20 > ------END GEEK CODE BLOCK------ >=20 To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message