Skip to contentSkip to conversation

question about String

DISCUSSION Allan Parreno 2 participants 2 messages Aug 24, 2007 – Aug 26, 2007

lore
Share & tools
lore
#0 lore raw

Hello,

how do i configure that all mp3 extention will block using iptables --string value?

is this correct?

/sbin/iptables -I INPUT -j DROP -p tcp -s 0.0.0.0/0 -m string --string "*.mp3"

thanks

____________________________________________________________________________________
Yahoo! oneSearch: Finally, mobile search
that gives answers, not web links.
http://mobile.yahoo.com/mobileweb/onesearch?refer=1ONXIC

#1 lore raw
Quoted 7 lines · Allan Parreno

Hello,

how do i configure that all mp3 extention will block using iptables --string value?

is this correct?

/sbin/iptables -I INPUT -j DROP -p tcp -s 0.0.0.0/0 -m string --string "*.mp3"

The string match extension does not support wildcard operators; just strings. An equivalent rule to what you are trying to accomplish above would be to just remove the "*" from "*.mp3". However, you may find that this is too broad a rule and that it starts to mess with legitimate communications since ".mp3" is not a very specific search criteria.

--
Michael Rash
http://www.cipherdyne.org/
Key fingerprint = 53EA 13EA 472E 3771 894F AC69 95D8 5D6B A742 839F