Date: Fri, 1 Jun 2001 12:54:43 +0200 From: Urban Olsson <Urban.E.Olsson@telia.se> To: Bjoern Fischer <bfischer@Techfak.Uni-Bielefeld.DE>, Urban Olsson <Urban.E.Olsson@telia.se> Cc: freebsd-hackers@FreeBSD.ORG Subject: RE: modified FreeBSD gateway Message-ID: <778DFE9B4E3BD111A74E08002BA3DC0D03DA524A@trab-hermes.haninge.trab.se>
next in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?778DFE9B4E3BD111A74E08002BA3DC0D03DA524A>