Skip site navigation (1)Skip section navigation (2)
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´t 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´t
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
> 
> 
> Hello Urban,
> 
> > I have a question regarding modification of a FreeBSD 
> gateway (the Internet
> > gateway for a LAN). What I want to do is to have the 
> gateway pick up the
> > packets, modify the IP-header and resend the packet onto 
> the network. This
> > is a little bit like a NAT but I want to be able to do it 
> differently and on
> > my own terms. I guess that this means that I would be 
> forced to rewrite the
> > gateway source-code so it behaves as I want it to.
> 
> You can do this entirely in userspace. All you need is a 
> divert socket.
> See the manpage divert(4).
> 
>   Björn Fischer
> 
> -- 
> -----BEGIN GEEK CODE BLOCK-----
> GCS d--(+) s++: a- C+++(-) UB++++OSI++++$ P+++(-) L---(++) !E 
> W- N+ o>+
> K- !w !O !M !V  PS++  PE-  PGP++  t+++  !5 X++ tv- b+++ D++ G 
> e+ h-- y+ 
> ------END GEEK CODE BLOCK------
> 

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>