>> When a debian lenny box is used as a gateway, how can I capture the
>> layer 2 packets?
>>
>> Thanks in advance
>>
>>
> I may be wrong, but wireshark can't do this for you?
>> aptitude install wireshark
>
you can also try tcpdump. you can capture traffic wothout a GUI and then analyze it in wireshark.