sexta-feira, 6 de fevereiro de 2009

Como bloquear programas de comunicação no mikrotik 3.xx

Funciona somente com a versao 3.xx

/ip firewall layer7-protocol
add comment="" name=MSN regexp="ver [0-9]+ msnp[1-9][0-9]\? [\\x09-\\x0d -~]*c\
vr0\\x0d\\x0a\$usr 1 [!-~]+ [0-9. ]+\\x0d\\x0a\$ans 1 [!-~]+ [0-9. ]+\\x\
0d\\x0a\$"
add comment="" name="MSN FT" regexp=\
"^(ver [ -~]*msnftp\\x0d\\x0aver msnftp\\x0d\\x0ausrmethod msnmsgr:)"
add comment="" name=YAHOO regexp=\
"^(ymsgypnsyhoo).\?.\?.\?.\?.\?.\?.\?[lwt].*\\xc0\\x80"
add comment="" name=SKYPE regexp="^..\\x02............."
add comment="" name=SKYPE-TO-PHONE regexp="^(\\x01.\?.\?.\?.\?.\?.\?.\?.\?\\x0\
1\\x02.\?.\?.\?.\?.\?.\?.\?.\?\\x02\\x03.\?.\?.\?.\?.\?.\?.\?.\?\\x03\\\
x04.\?.\?.\?.\?.\?.\?.\?.\?\\x04\\x05.\?.\?.\?.\?.\?.\?.\?.\?\\x05\\x06.\
\?.\?.\?.\?.\?.\?.\?.\?\\x06\\x07.\?.\?.\?.\?.\?.\?.\?.\?\\x07\\x08.\?.\
\?.\?.\?.\?.\?.\?.\?\\x08\\x09.\?.\?.\?.\?.\?.\?.\?.\?\\x09\\x0a.\?.\?.\
\?.\?.\?.\?.\?.\?\\x0a\\x0b.\?.\?.\?.\?.\?.\?.\?.\?\\x0b\\x0c.\?.\?.\?.\
\?.\?.\?.\?.\?\\x0c\\x0d.\?.\?.\?.\?.\?.\?.\?.\?\\x0d\\x0e.\?.\?.\?.\?.\
\?.\?.\?.\?\\x0e\\x0f.\?.\?.\?.\?.\?.\?.\?.\?\\x0f\\x10.\?.\?.\?.\?.\?.\
\?.\?.\?\\x10\\x11.\?.\?.\?.\?.\?.\?.\?.\?\\x11\\x12.\?.\?.\?.\?.\?.\?.\
\?.\?\\x12\\x13.\?.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=IRC regexp="^(nick[\\x09-\\x0d -~]*user[\\x09-\\x0d -~]*:\
user[\\x09-\\x0d -~]*:[\\x02-\\x0d -~]*nick[\\x09-\\x0d -~]*\\x0d\\x0a)"
/ip firewall filter
add action=drop chain=forward comment="" disabled=no layer7-protocol=MSN \
src-address=192.168.0.0/24