跳到主要內容

發表文章

目前顯示的是 十月, 2016的文章

Mongo DB PHP Extension 安裝筆記

UBUNTU環境 (14.04)


sudo apt-get install pkg-config

sudo apt-get install -y autoconf g++ make openssl libssl-dev libcurl4-openssl-dev pkg-config libsasl2-dev libpcre3-dev

sudo pear install pecl/mongodb


成功畫面:








Synology NAS環境

待補

UBUNTU 14.04 Apache2 設定Proxy至其他Port

1. 更新程式庫

aptitude    update
aptitude -y upgrade


2. 取得編譯工具

aptitude install -y build-essential


3. 安裝插件與關聯
aptitude install -y libapache2-mod-proxy-html libxml2-dev

4. 設定Apache
a2enmod proxy proxy_ajp proxy_http rewrite deflate headers proxy_balancer proxy_connect proxy_html

5. 新增Virtual Host設定檔
 <VirtualHost *:80>     ProxyPreserveHost On
    # Servers to proxy the connection, or;     # List of application servers:     # Usage:     # ProxyPass / http://[IP Addr.]:[port]/     # ProxyPassReverse / http://[IP Addr.]:[port]/     # Example:      ProxyPass / http://0.0.0.0:8080/     ProxyPassReverse / http://0.0.0.0:8080/
    ServerName localhost </VirtualHost>

6. 重開Apache
service apache2 restart
7. 出現Notice提示要多裝mod_xml2enc


[proxy_html:notice] [pid 26434] AH01425: I18n support in mod_proxy_html requires mod_xml2enc. Without it, non-ASCII characters in proxied pages are likely to display incorrectly.
sudo apt-get install apache2-prefork-dev libxml2 libxml2-dev apache2-dev
mkdir ~/modbui…

網頁資安問題解決筆記

一、Slow HTTP Denial of Service Attack

俗稱的DDOS攻擊,解決方法有很多種。


方法一:以Apache來說的話,可安裝套件 Mod_Antiloris。 1. 下載檔案

cd /usr/local/src wget http://sourceforge.net/projects/mod-antiloris/files/mod_antiloris-0.4.tar.bz2 tar -xvjf mod_antiloris-0.4.tar.bz2 cd mod_antiloris-* apxs -a -i -c mod_antiloris.c
2. 重啟apache service httpd restart
3. 檢查是否有掛載mod_antiloris httpd -M | grep antiloris

方法二:更改防火牆設定
iptables -I INPUT -p tcp --dport 80 \ -m connlimit --connlimit-above 20 --connlimit-mask 40 -j DROP


二、RC4 cipher suites detected、SSL weak ciphers

在conf檔裡加上以下的設定:

 SSLProtocol all -SSLv2 -SSLv3
 SSLHonorCipherOrder on
 # Compression is disabled by default on my distribution (CentOS 6)
 # SSLCompression off
SSLCipherSuite ECDH+AESGCM:DH+AESGCM:ECDH+AES256:DH+AES256:ECDH+AES128:DH+AES:ECDH+3DES:DH+3DES:RSA+AESGCM:RSA+AES:RSA+3DES:!aNULL:!MD5:!DSS

三、The FREAK attack (export cipher suites supported)



四、SSL certificate public key less than 2048 bit

openssl genrsa -out test.key 2048
openssl genrsa -des3 -out test.key 2048
openss…

Install IPKG on a Synology NAS

安裝機種 DS1815+

1. 檢查CPU型號
INTEL Atom C2538

2. 下載安裝檔: http://ipkg.nslu2-linux.org/feeds/optware/
以DS1815+機種可相容的型號為: http://ipkg.nslu2-linux.org/feeds/optware/syno-i686/cross/unstable/syno-i686-bootstrap_1.2-7_i686.xsh.

3. 打開NAS的SSH進入Command Line

4. 下載並安裝

cd /tmp
wget http://ipkg.nslu2-linux.org/feeds/optware/syno-i686/cross/unstable/syno-i686-bootstrap_1.2-7_i686.xsh
chmod +x syno-i686-bootstrap_1.2-7_i686.xsh 
sh syno-i686-bootstrap_1.2-7_i686.xsh

5. 刪除暫存檔
rm syno-i686-bootstrap_1.2-7_i686.xsh

6. 測試安裝是否完成
ipkg update