Zend Guard Loader (Runtime for PHP 5.3)
http://www.zend.com/en/products/guard/downloads
качаем с сайта после регистрации или прямо под linux х64
http://downloads.zend.com/guard/5.5.0/ZendGuardLoader-php-5.3-linux-glibc23-x86_64.tar.gz
http://www.zend.com/en/products/guard/downloads
http://downloads.zend.com/guard/5.5.0/ZendGuardLoader-php-5.3-linux-glibc23-x86_64.tar.gz
cat ./panic.log
2012-10-20 22:13:18 Exim configuration error in line 195 of /etc/exim/exim.conf:
error in ACL: syntax error or unrecognized name after "set" in ACL modifier "set acl_m_spam_score_int = $spam_score_int"
.ifdef SA_ENABLE
warn
!authenticated = *
hosts = !+relay_from_hosts
condition = ${if < {$message_size}{100K}}
spam = SA_SPAMD_USER:true/defer_ok
add_header = X-Spam_score: $spam_score\n\
X-Spam_score_int: $spam_score_int\n\
X-Spam_bar: $spam_bar\n\
X-Spam_report: $spam_report
set acl_m4 = $spam_score_int
logwrite = From $sender_address to $recipients X-Spam_score: $acl_m4.
deny
condition = ${if !eq{$acl_m4}{} {yes}{no}}
condition = ${if >{$acl_m4}{SA_SCORE_REJECT} {yes}{no}}
message = Content analisis tool detect spam (from $sender_address to $recipients). Contact SA_ABUSE_ADDR.
.endif
accept
http://habrahabr.ru/post/154235
iptables -A INPUT -p udp -m udp -m string --hex-string "|17c74a30a2fb752396b63532b1bf79b0|" --algo kmp -j DROP
iptables -A INPUT -p udp -m udp -m string --hex-string "|17951a20e2ab6d63d6ac7d62f1f721e057cd4270e2f1357396f66522f1ed61f0|" --algo kmp -j DROP
iptables -A INPUT -p udp -m udp -m string --hex-string "|178f5230e2e17d73d6bc6562f1ed29e0|" --algo kmp -j DROP
iptables -A INPUT -p udp -m udp -m string --hex-string "|d50000806e000000|" --algo kmp -j DROP
iptables -A INPUT -p udp -m udp -m string --hex-string "|ffffffff6765746368616c6c656e6765000000000000|" --algo kmp -j DROP
/sbin/iptables -A FORWARD -m udp -p udp -m string --hex-string "|0000000000380000|" --algo bm --from 36 --to 45 -j DROP
/sbin/iptables -A FORWARD -m udp -p udp -m string --hex-string "|7F FF FF FF AB|" --algo bm --from 40 --to 44 -j DROP
/sbin/iptables -A FORWARD -m udp -p udp -m string --hex-string "|7F FF FF FF 00 03 20 00|" --algo bm --from 36 --to 43 -j DROP
/sbin/iptables -A FORWARD -m udp -p udp -m string --hex-string "|00 38 00 00 00 01 00 00|" --algo bm --from 40 --to 47 -j DROP
iptables -A FORWARD -p udp -m length --length 61 -m string --hex-string "|7F FF FF FF|" --algo kmp --from 40 --to 44 -j DROP
#!/bin/sh
kldload ng_bpf
kldload ng_tag
kldload ng_ipfw
/usr/sbin/ngctl -f- < <-SEQ
mkpeer ipfw: bpf 61 ipfw_hook61
name ipfw:61 bpf_utp_filter
mkpeer bpf_utp_filter: tag matched tag_utp
name bpf_utp_filter:matched tag_utp_tagger
SEQ
ngctl msg bpf_utp_filter: setprogram { thisHook=\"ipfw_hook61\" ifNotMatch=\"ipfw_hook61\" ifMatch=\"matched\" bpf_prog_len=12 bpf_prog=[ { code=48 jt=0 jf=0 k=0 } { code=84 jt=0 jf=0 k=240 } { code=21 jt=0 jf=8 k=64 } { code=48 jt=0 jf=0 k=9 } { code=21 jt=0 jf=6 k=17 } { code=40 jt=0 jf=0 k=6 } { code=69 jt=4 jf=0 k=8191 } { code=177 jt=0 jf=0 k=0 } { code=64 jt=0 jf=0 k=20 } { code=21 jt=0 jf=1 k=2147483647 } { code=6 jt=0 jf=0 k=65535 } { code=6 jt=0 jf=0 k=0 } ] }
ngctl msg bpf_utp_filter: setprogram { thisHook=\"matched\" ifMatch=\"ipfw_hook61\" bpf_prog_len=1 bpf_prog=[ { code=6 jt=0 jf=0 k=96 } ] }
ngctl msg tag_utp_tagger: sethookin { thisHook=\"tag_utp\" ifNotMatch=\"tag_utp\" }
ngctl msg tag_utp_tagger: sethookout { thisHook=\"tag_utp\" tag_cookie=1148380143 tag_id=61 }
ipfw add netgraph 61 udp from any to any iplen 0-61
ipfw add deny udp from any to any tagged 0-61
# to test outgoing - tcpdump -pni Out_Interface "ip[40:4]=0x7FFFFFFF" and "ip[44:1]=0xab" and ether src Ext_If_Mac
tcpdump -Xni vlan0 "ip[40:4]=0x7FFFFFFF and ip[44:1]=0xAB"
kldload ng_ipfw
# ngctl mkpeer ipfw: bpf 127 ipfw
# ngctl name ipfw:127 utp_filter
# ngctl name ipfw:127 pptp_utp_filter
# ngctl msg pptp_utp_filter: setprogram '{ thisHook="ipfw" ifMatch="matched" ifNotMatch="ipfw" bpf_prog_len=36 bpf_prog=[ { code=0xb1 } { code=0x40 } { code=0x54 k=4286578687 } { code=0x15 jf=31 k=805406731 } { code=0x50 k=1 } { code=0x54 k=128 } { code=0x74 k=5 } { code=0x4 k=12 } { code=0xc } { code=0x7 } { code=0x48 } { code=0x15 jf=3 k=65283 } { code=0x87 jf=3 } { code=0x4 k=2 } { code=0x7 } { code=0x50 } { code=0x15 jf=3 } { code=0x87 jf=3 } { code=0x4 k=1 } { code=0x7 } { code=0x50 } { code=0x15 jf=13 k=33 } { code=0x87 jf=3 } { code=0x4 k=1 } { code=0x7 } { code=0x50 k=9 } { code=0x15 jf=8 k=17 } { code=0x50 } { code=0x54 k=15 } { code=0x64 k=2 } { code=0xc } { code=0x7 } { code=0x40 k=20 } { code=0x15 jf=1 k=2147483647 } { code=0x6 k=65535 } { code=0x6 } ] }'
# sysctl net.inet.ip.fw.one_pass=0
# ipfw add 127 netgraph 127 gre from any to any via ng0
# ngctl msg pptp_utp_filter: getstats '"ipfw"'
/usr/sbin/ngctl -f- <<-SEQ
mkpeer ipfw: bpf 61 ipfw_hook61
name ipfw:61 bpf_utp_filter
mkpeer bpf_utp_filter: tag matched tag_utp
name bpf_utp_filter:matched tag_utp_tagger
SEQ
ngctl msg bpf_utp_filter: setprogram { thisHook=\"ipfw_hook61\" ifNotMatch=\"ipfw_hook61\" ifMatch=\"matched\" bpf_prog_len=12 bpf_prog=[ { code=48 jt=0 jf=0 k=0 } { code=84 jt=0 jf=0 k=240 } { code=21 jt=0 jf=8 k=64 } { code=48 jt=0 jf=0 k=9 } { code=21 jt=0 jf=6 k=17 } { code=40 jt=0 jf=0 k=6 } { code=69 jt=4 jf=0 k=8191 } { code=177 jt=0 jf=0 k=0 } { code=64 jt=0 jf=0 k=20 } { code=21 jt=0 jf=1 k=2147483647 } { code=6 jt=0 jf=0 k=65535 } { code=6 jt=0 jf=0 k=0 } ] }
ngctl msg bpf_utp_filter: setprogram { thisHook=\"matched\" ifMatch=\"ipfw_hook61\" bpf_prog_len=1 bpf_prog=[ { code=6 jt=0 jf=0 k=96 } ] }
ngctl msg tag_utp_tagger: sethookin { thisHook=\"tag_utp\" ifNotMatch=\"tag_utp\" }
ngctl msg tag_utp_tagger: sethookout { thisHook=\"tag_utp\" tag_cookie=1148380143 tag_id=61 }
ipfw add netgraph 61 udp from any to any iplen 0-61
ipfw add deny udp from any to any tagged 0-61
http://citrin.ru/freebsd:ng_ipfw_ng_bpf
http://habrahabr.ru/post/140375/
/sbin/sysctl -w net.inet.ip.forwarding=1
/sbin/sysctl -w net.inet.tcp.always_keepalive=1
/sbin/sysctl -w kern.ipc.somaxconn=1024
/sbin/sysctl -w kern.somaxconn=512
/sbin/sysctl -w net.inet.tcp.delayed_ack=0
/sbin/sysctl -w net.inet.ip.portrange.last=30000
#samba
/sbin/sysctl -w net.local.stream.recvspace=65535
/sbin/sysctl -w net.local.stream.sendspace=65535
/sbin/sysctl -w net.inet.tcp.sendspace=65535
/sbin/sysctl -w net.inet.tcp.recvspace=65535
maxusers 200
options "MAXDSIZ=(512*1024*1024)"
options "DFLDSIZ=(128*1024*1024)"
options "NMBCLUSTERS=16384"
options "CHILD_MAX=512"
options "OPEN_MAX=512"
location / {
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Host $host;
proxy_redirect off;
proxy_pass http://localhost:8080;
}
location / {
// включаем модуль, в off будет слать запросы на location указанный в ModSecurityPass
ModSecurityEnabled on;
// конфиг mod_security, здесь подразумевается, что лежит рядом с nginx.conf
ModSecurityConfig modsecurity.conf;
//named location, на который уйдет запрос, успешно прошедший проверку
ModSecurityPass @backend;
}
location @backend {
// стандартный конфиг
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Host $host;
proxy_redirect off;
proxy_pass http://localhost:8080;
}
http://www.nic.ru/ip-reg/service/TRANSL/ipv4-policies.html
http://subnets.ru/blog/?p=24
http://subnets.ru/wrapper.php?p=4
http://habrahabr.ru/post/55181/