ng_nat connected to ng_ether not working?

Julian Elischer julian at elischer.org
Mon Aug 13 08:57:55 PDT 2007


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 at freebsd.org mailing list
>> http://lists.freebsd.org/mailman/listinfo/freebsd-net
>> To unsubscribe, send any mail to "freebsd-net-unsubscribe at freebsd.org"
> 
> _______________________________________________
> freebsd-net at freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-net
> To unsubscribe, send any mail to "freebsd-net-unsubscribe at freebsd.org"



More information about the freebsd-net mailing list