Just for later refference:
I tried to use the template fragment modification method for the SME 8.0 B4 as mentioned in
http://wiki.contribs.org/Firewall "Block incomming ip" and I replaced filtering rule based on source ip with a string/data content filtering rule.
This showed that the SME 8.0 Beta were capable of doing such string/data content filtering based on standard template modifications according to existing procedures for the 7.4.
Technically it should then be possible to block harmfull content from open ports and to apply effective rules like: Open port 80 for all traffic, exept for that traffic with unwanted content ..
This blocking of unwanted content should be possible to do for Asterisk and any other server functions.
It should also be possible to apply other rules for stopping mishaped and spoofed packets via this aditional DenyRiffRaff custom fragment.
Technically it should also be possible to design and apply data content filtering rules that is designed from what you find as hacking atempts and unwanted traffic in the log.
Don't know how such content filtering can put extra load on processor or slow down traffic.
The Asterisk filtering issue for the SME 8.0 B4 should be possible to handle like this:
Custom templates
Block incoming packets with unwanted content
I want to block All traffic from some unwanted data content to my server.
Create a custom template and block data content
mkdir -p /etc/e-smith/templates-custom/etc/rc.d/init.d/masq/
pico -w /etc/e-smith/templates-custom/etc/rc.d/init.d/masq/40DenyRiffRaff
iptables -A INPUT -p udp -m udp --dport 5060 -m string --string "Cirpack KeepAlive Packet" --algo bm --to 65535 --source 123.123.123.123 -j DROP
expand and restart
/sbin/e-smith/expand-template /etc/rc.d/init.d/masq
/etc/init.d/masq restart