Archive for March, 2018

30
Mar

openvz vxlan

   Posted by: admin    in Mẹo vặt của hiếu râu

download template here https://openvz.org/Download/template/precreated

# vzctl create 350 –ostemplate centos-6-x86_64-minimal
# vzctl set 350 –netif_add eth0 –save
# vzctl start 350

# brctl addbr br0
# brctl addif br0 veth350.0
# brctl show
# ip link add vxlan0 type vxlan id 100 dev eth3
# ifconfig vxlan0 up
# ifconfig br0 up
# brctl addif br0 vxlan0
# brctl show
bridge name     bridge id               STP enabled     interfaces
br0             8000.001851a44308       no              veth350.0
———————————————————————–vxlan0
# bridge fdb append to 00:00:00:00:00:00 dst 10.99.92.5 dev vxlan0
# bridge fdb append to 00:00:00:00:00:00 dst 10.99.92.6 dev vxlan0
# bridge fdb show
00:00:00:00:00:00 dev vxlan0 dst 10.99.92.5 self permanent
00:00:00:00:00:00 dev vxlan0 dst 10.99.92.6 self permanent
27
Mar

apache hardening

   Posted by: admin    in Mẹo vặt của hiếu râu

ServerTokens Prod

ServerSignature Off
LoadModule reqtimeout_module modules/mod_reqtimeout.so

<Location />
<LimitExcept GET POST>
order deny,allow
deny from all
</LimitExcept>
</Location>

TraceEnable Off
Header always append X-Frame-Options SAMEORIGIN

RequestReadTimeout header=10-30,MinRate=500 body=10,MinRate=2000

ssl.conf
SSLProtocol all -SSLv2 -SSLv3 -TLSv1 -TLSv1.1
SSLHonorCipherOrder On
SSLCipherSuite ECDHE-RSA-AES128-SHA256:AES128-GCM-SHA256:!RC4:HIGH:!MD5:!aNULL:!EDH:!3DES
php.ini
expose_php = Off
================
disable tcp timestamp
run and put the line to /etc/rc.d/rc.local
#echo 0 > /proc/sys/net/ipv4/tcp_timestamps
disable icmp timestamp
-A INPUT -p icmp –icmp-type 8 -j ACCEPT