S小魚仔S 網誌搜尋

2020年2月27日 星期四

S小魚仔S Ubuntu 18.04 安裝 Unifi Ac Controller ( 無線控制器 )

使用「Ubuntu」安裝「Unifi」無線控制器確實很複雜,安裝近10次都沒成功,後來找到「自動化腳本」該作者是 glennrietveld8 編寫完成。首先 Ubuntu 必須採用「root」登入操作,必須連上「Internet」因該腳本會下載安裝「mongodb」和「Oracle-java8」和「Unifi Ac Controller」。

1. 下載「unifi-5.12.35.sh」腳本

2. 如果您人剛好在「中國大陸」麻煩修改「來源庫」否則下載非常慢,甚至好幾個鐘頭。

cd /etc/apt/
cp sources.list sources.list.bak
true > sources.list

#編輯「sources.list」加入「中國大陸」來源庫
vi /etc/apt/sources.list 

deb http://mirrors.aliyun.com/ubuntu/ bionic main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ bionic-security main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ bionic-updates main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ bionic-proposed main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ bionic-backports main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ bionic main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ bionic-security main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ bionic-updates main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ bionic-proposed main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ bionic-backports main restricted universe multiverse
deb https://mirrors.ustc.edu.cn/ubuntu/ bionic main restricted universe multiverse
deb-src https://mirrors.ustc.edu.cn/ubuntu/ bionic main restricted universe multiverse
deb https://mirrors.ustc.edu.cn/ubuntu/ bionic-updates main restricted universe multiverse
deb-src https://mirrors.ustc.edu.cn/ubuntu/ bionic-updates main restricted universe multiverse
deb https://mirrors.ustc.edu.cn/ubuntu/ bionic-backports main restricted universe multiverse
deb-src https://mirrors.ustc.edu.cn/ubuntu/ bionic-backports main restricted universe multiverse
deb https://mirrors.ustc.edu.cn/ubuntu/ bionic-security main restricted universe multiverse
deb-src https://mirrors.ustc.edu.cn/ubuntu/ bionic-security main restricted universe multiverse
deb https://mirrors.ustc.edu.cn/ubuntu/ bionic-proposed main restricted universe multiverse
deb-src https://mirrors.ustc.edu.cn/ubuntu/ bionic-proposed main restricted universe multiverse
deb http://mirrors.163.com/ubuntu/ bionic main restricted universe multiverse
deb http://mirrors.163.com/ubuntu/ bionic-security main restricted universe multiverse
deb http://mirrors.163.com/ubuntu/ bionic-updates main restricted universe multiverse
deb http://mirrors.163.com/ubuntu/ bionic-proposed main restricted universe multiverse
deb http://mirrors.163.com/ubuntu/ bionic-backports main restricted universe multiverse
deb-src http://mirrors.163.com/ubuntu/ bionic main restricted universe multiverse
deb-src http://mirrors.163.com/ubuntu/ bionic-security main restricted universe multiverse
deb-src http://mirrors.163.com/ubuntu/ bionic-updates main restricted universe multiverse
deb-src http://mirrors.163.com/ubuntu/ bionic-proposed main restricted universe multiverse
deb-src http://mirrors.163.com/ubuntu/ bionic-backports main restricted universe multiverse
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic main restricted universe multiverse
deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic main restricted universe multiverse
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-updates main restricted universe multiverse
deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-updates main restricted universe multiverse
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-backports main restricted universe multiverse
deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-backports main restricted universe multiverse
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-security main restricted universe multiverse
deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-security main restricted universe multiverse
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-proposed main restricted universe multiverse
deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-proposed main restricted universe multiverse
deb https://mirrors.tuna.tsinghua.edu.cn/mongodb/apt/ubuntu trusty/mongodb-org/stable multiverse



#更新「來源」庫
apt-get install

#安裝「CA」憑證 
ca-certificates wget -y

3. 執行「Script」
bash unifi-5.12.35.sh







#如果您遇到下載更新「mongodb」非常慢,請跟著下面步驟處理






前往該連結「https://repo.mongodb.org/apt/ubuntu/dists/xenial/mongodb-org/3.4/multiverse/binary-amd64/」下載 ( mongodb-org-shell_3.4.24_amd64.deb、mongodb-org-server_3.4.24_amd64.deb、mongodb-org-mongos_3.4.24_amd64.deb、mongodb-org-tools_3.4.24_amd64.deb ) 版本必須一模一樣。


#接著手動安裝「mongodb」離線檔案「.deb
dpkg -i mongodb-org-shell_3.4.24_amd64.deb
dpkg -i mongodb-org-server_3.4.24_amd64.deb 
dpkg -i mongodb-org-mongos_3.4.24_amd64.deb
dpkg -i mongodb-org-tools_3.4.24_amd64.deb

#接著再次執行Script
bash unifi-5.12.35.sh

#接著我又遇問題到下載「unifi」主程序非常慢,請自行下載「https://dl.ui.com/unifi/5.12.35/unifi_sysvinit_all.deb」離線檔案,進行離線安裝
dpkg -i unifi_sysvinit_all.deb



#接著再次執行Script
bash unifi-5.12.35.sh

#這時候就會下載「unifi-update.sh」透過該腳本可以自動進行「備份」與「升級」Unifi 控制器

#看到該「畫面」就已經完成嚕

#檢查「通訊端口

#登入「Wifly」控制器「網址」 ( https://ip:8443/ ) 設定就可以嚕


參考資料
Glenn R.」-「glennr.nl/scripts
Community.ui.com」-「UniFi Installation Scripts

2020年2月10日 星期一

S小魚仔S Fortigate 6.0.9 Traffice Shaping QoS 流量管制

1. 配置「流量塑形器」定義「流量

配置「政策&物件」=>「流量塑形器」=>「新增

定義「流量」速度以及「最大頻寬

2. 配置「流量塑形政策」完成限速


配置「來源」與「目的」與「服務」,「Shared Shaper」(上傳速度)、「反向流向塑形器」(下載速度) 

4. 使用「Speedtest」測試「速度

2020年2月5日 星期三

S小魚仔S Fortigate 6.0.9 封鎖外網只允許使用 QQ 或 WeChat 通訊

由於 Fortigate Firmware 更新非常快,每一個跨度版本更新「設定」位置都不一樣,為了避免忘記,再次記錄下來。

啟用「用戶應用程式控制

資安管理設定」=> 「應用程式」=>「新增特徵碼
PS. 建議各位定期更新「Fortigate Firmware」每次都會更新「特徵碼

選擇「全選



預設特徵碼全部都是「封鎖」只要選擇「應用通訊」允許即可



 選擇「政策&物件」在「齒輪」圖示添加「應用程式控制」欄位

在 允許「Internet」ACL, 應用程式控制欄位套用「APP default」 

日誌與報表」瀏覽「通訊程序」相關「日誌