How to block specific UDP packet outgoing from machine using iptables
I want to block specific UDP packet OUTGOING from my machine using iptables. Packet has a string in “hex in RAW”(?) i want to check packet by it.
Like: If UDP packet hex RAW match “test_text” – block it.
//EDIT:
i have something like this
iptables -A OUTPUT -p udp -m multiport --sports 8000 -m string --algo bm --string "test" -j DROP
but it gives error
iptables: No chain/target/match by that name.
There is a “string” match netfilter extension, that might or might not be compiled in/available as a module on your system.
Do not forget that such things can inherently have a serious performance impact, especially if more packets than necessary are subjected to that match.
Check more discussion of this question.
No related posts.
Leave a comment
Recent Posts
Tags
active-directory
amazon-ec2
apache
apache2
backup
bash
centos
cisco
command-line
debian
dns
email
exchange
firewall
iis
iis7
iptables
linux
macosx
monitoring
mysql
networking
nginx
performance
permissions
php
postfix
raid
security
sql-server
sql-server-2005
sql-server-2008
ssh
ssl
ubuntu
unix
virtualization
vpn
webserver
windows
windows-7
windows-server-2003
windows-server-2008
windows-server-2008-r2
windows-xp





