Jump to content

netgraph + divert

Здравствуйте, вообщем долгое время снима трафик с помощью netgraph, через ipfw заворачивал трафик в divert порт, понадобилось создать еще 3 таких, как это достичь подскажите пожалуйста ?


делал так ...


/usr/sbin/ngctl -f- <<-SEQ

mkpeer ipacct dummy dummy

name .:dummy ipacct_div

mkpeer ipacct_div: tee div_in left2right

name ipacct_div:div_in div_tee

rmhook dummy

mkpeer div_tee: echo right echo

name div_tee:right div_echo

mkpeer div_tee: ksocket left inet/raw/divert

name div_tee:left div_sock

msg div_sock: bind inet/



/usr/local/sbin/ipacctctl -i ipacct_div:div dlt RAW

/usr/local/sbin/ipacctctl -i ipacct_div:div v 0

/usr/local/sbin/ipacctctl -i ipacct_div:div th 1000000



Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this