Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 13 Aug 2007 08:57:58 -0700
From:      Julian Elischer <julian@elischer.org>
To:        Rajkumar S <rajkumars@gmail.com>
Cc:        freebsd-net@freebsd.org
Subject:   Re: ng_nat connected to ng_ether not working?
Message-ID:  <46C07F86.6000201@elischer.org>
In-Reply-To: <46C07D0A.1010301@elischer.org>
References:  <64de5c8b0708130133i51c1918bg5ad8ab3c6e381f5b@mail.gmail.com> <46C07D0A.1010301@elischer.org>

next in thread | previous in thread | raw e-mail | index | archive | help
Julian Elischer wrote:
> Rajkumar S wrote:
>> Hi,
>>
>> I am trying to connect an ng_nat node between ng_ether:upper and
>> ng_ether:lower so that all packets traversing via ng_ether node gets
>> nat'd. But it does not seems to be working.
>>
>> I am using the follwoing commands to connect rl1: and ng_nat
>>
>> ngctl mkpeer rl1: nat upper out
>> ngctl name rl1:upper nat
>> ngctl connect rl1: nat: lower in
>> ngctl msg nat: setaliasaddr x.x.x.x
> 
> ng_nat assumes you have IP packets
> ng_ether gives you ethernet packets.

I should add, that you probably want to divert the IP packets
from the IP layer by using ipfw, a divert socket, and a netgraph
divert ksocket,
(Or a ipfw netgraph ipfw rule if you are using 7.0, I don't believe it is in 6.x)

> 
>>
>> (I have also swapped out with in in the above set of commands, just in
>> case, but with same results)
>>
>> with warm regards,
>>
>> raj
>> _______________________________________________
>> freebsd-net@freebsd.org mailing list
>> http://lists.freebsd.org/mailman/listinfo/freebsd-net
>> To unsubscribe, send any mail to "freebsd-net-unsubscribe@freebsd.org"
> 
> _______________________________________________
> freebsd-net@freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-net
> To unsubscribe, send any mail to "freebsd-net-unsubscribe@freebsd.org"




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?46C07F86.6000201>