[libdnet-devel] Intercepting traffic using libdnet
Status: Abandoned
Brought to you by:
dugsong
|
From: Rajkumar S. <raj...@as...> - 2006-08-03 14:51:11
|
Hi,
I am looking to intercept the traffic flowing through my FreeBSD
*gateway* and selectievly allow/reject traffic (snort_inline for
FreeBSD) I had gone through the previous archives and now studying the
fragroute-2.0b1 sources. From the source I am trying to extract the
minimum possible code required for intercepting.
From what I understand from the sources, the following is the minimum code:
import dnet, dpkt
dst = dnet.addr("192.168.3.49")
src = dnet.addr('192.168.3.50')
tun = dnet.tun(src, dst)
pkt = tun.recv()
print pkt
tun.send (pkt)
tun.close()
192.168.3.50 is the machine running this code and 49 is another
machine. After running this program I am not able to ping from 49 to
50 or vice versa.
What is the src and dst for? I do not yet fully comprehend what I have
written, but is there some thing I am missing out? There is not much
help available in the net. Any help here would be much appreciated.
with warm regards,
raj
|