2021年7月12日 星期一

Linux RPM query change log and CVE

Linux RPM 查詢某套件的 Change Log 及 CVE

例:
rpm -q --changelog httpd
資料通常還滿長的,可以加 | less 查看,時序是新的在前面

以下節錄 httpd 的輸出資料
* 2021 5月 14 五 Lubos Uhliarik <luhliari@redhat.com> - 2.4.37-40
- Resolves: #1952557 - mod_proxy_wstunnel.html is a malformed XML
- Resolves: #1937334 - SSLProtocol with based virtual hosts

* 2021 1月 26 二 Artem Egorenkov <aegorenk@redhat.com> - 2.4.37-39
- prevent htcacheclean from while break when first file processed

* 2021 1月 26 二 Lubos Uhliarik <luhliari@redhat.com> - 2.4.37-38
- Resolves: #1918741 - Thousands of /tmp/modproxy.tmp.* files created by apache

* 2020 12月 09 三 Lubos Uhliarik <luhliari@redhat.com> - 2.4.37-37
- Resolves: #1883648 - [RFE] Update httpd directive SSLProxyMachineCertificateFile
to be able to handle certs without matching private key

* 2020 11月 30 一 Lubos Uhliarik <luhliari@redhat.com> - 2.4.37-36
- Resolves: #1896176 - [RFE] ProxyWebsocketIdleTimeout from httpd
mod_proxy_wstunnel
- Resolves: #1847585 - mod_ldap: High CPU usage at apr_ldap_rebind_remove()

* 2020 11月 11 三 Lubos Uhliarik <luhliari@redhat.com> - 2.4.37-35
- Resolves: #1651376 - centralizing default index.html for httpd

* 2020 11月 06 五 Lubos Uhliarik <luhliari@redhat.com> - 2.4.37-33
- Resolves: #1868608 - Intermittent Segfault in Apache httpd due to pool
concurrency issues
- Resolves: #1861380 - httpd/mod_proxy_http/mod_ssl aborted when sending
a client cert to backend server
- Resolves: #1680118 - unorderly connection close when client attempts
renegotiation

* 2020 10月 29 四 Lubos Uhliarik <luhliari@redhat.com> - 2.4.37-31
- Resolves: #1677590 - CVE-2018-17199 httpd:2.4/httpd: mod_session_cookie does
not respect expiry time
- Resolves: #1869075 - CVE-2020-11984 httpd:2.4/httpd: mod_proxy_uswgi buffer
overflow
- Resolves: #1872828 - httpd: typo in htpasswd, contained in httpd-tools package
- Resolves: #1869576 - httpd : mod_proxy should allow to specify
Proxy-Authorization in ProxyRemote directive
- Resolves: #1875844 - mod_cgid takes CGIDScriptTimeout x 2 seconds for timeout
- Resolves: #1891829 - mod_proxy_hcheck Doesn't perform checks when in
a balancer

2021年7月11日 星期日

Upgrade PHP 7.4 to 8.0 (remi repo)

dnf -y module disable php:remi-7.4
dnf -y module enable php:remi-8.0
rpm -qa | grep ^php | xargs rpm -e
dnf -y install php php-opcache php-cli php-pdo php-mysqlnd php-process php-snmp php-ldap php-pecl-zip php-pecl-mcrypt

2021年7月8日 星期四

Google Cloud adopt Rocky Linux

CentOS 的接班人主要就 AlmaLinux 及 Rocky Linux 這兩家
Google 已經把 Rocky Linux 納入 Compute Engine 的 OS 選項
Operating system details

Apache + PHP FPM Increase Timeout

Apache + PHP FPM 的模式,
若程式執行會超過一分鐘,光是調整 php.ini 的 max_execution_time 是不夠的,
就需要調整 Apache 的 Timeout,預設是 60
PHP FPM 的模式,是走 proxy mode,所以 ProxyTimeout 也要調整,

例如: 設成五分鐘
Timeout 300
ProxyTimeout 300

2021年7月7日 星期三

Change Windows 10 Sandbox Memory

Windows 10 預設的沙箱(Sandbox)預設是 4G 記憶體
若要調大記憶體,可以建立一個副檔名為 .wsb 的檔案,內容

<Configuration>
<MemoryInMB>8192</MemoryInMB>
</Configuration>

以上例子是改為 8G
然後點這個檔執行,用沙箱開啟即可
其他設定可以參考 Windows Sandbox configuration

2021年7月5日 星期一

FortiClient VPN and Hyper-V Default Switch Conflict

FortiClient VPN 和 Hyper-V Default Switch 衝突問題

Hyper-V 的 Default Switch Private 網段是隨機分配的,有時會跟 VPN 的網段衝突。
但有時明明沒有衝突,Default Switch Private 網段卻在撥上 VPN 後不通,再也拿不到 IP

Workaround 解決方式,到「服務」把 Internet Connection Sharing (ICS) 重啟即可
另一個解決方式是建立一個虛擬交換器,Bridge 到電腦的網卡,不要用 Default Switch 的 NAT

2021年7月3日 星期六

HiNet to Public DNS speed test

測試環境 VM Linux CentOS Stream release 8
ISP HiNet
測試方法 抓 Alexa Top 50 站,用 dig 去Query NS 及 A record,計算總秒數
測試腳本 alexa-top-50-sites-dns-bench.sh

測試目標
Google 8.8.8.8, 8.8.4.4
IBM 9.9.9.9, 149.112.112.112
Cloudflare 1.1.1.1, 1.0.0.1
Cisco OpenDNS 208.67.222.222, 208.67.220.220
Comodo 8.26.56.26, 8.20.247.20
Norton 199.85.126.10, 199.85.127.10
Verisign 64.6.64.6, 64.6.65.6
Level3 209.244.0.3, 209.244.0.4
HiNet 168.95.1.1 168.95.192.1

每家的 DNS 都有 A B 兩組,以 A B B A 的順序測試,記錄執行時間,及平均
測試結果
  DNS 執行時間(秒) 排名
Google 8.8.8.8 6.817  
  8.8.4.4 3.882  
  8.8.4.4 2.143  
  8.8.8.8 3.722  
  平均 4.141 第2名
Cloudflare 1.1.1.1 2.579  
  1.0.0.1 1.027  
  1.0.0.1 1.038  
  1.1.1.1 1.034  
  平均 1.420 第1名
IBM 9.9.9.9 16.533  
  149.112.112.112 10.487  
  149.112.112.112 12.890  
  9.9.9.9 17.432  
  平均 14.335 第7名
Cisco OpenDNS 208.67.222.222 12.120  
  208.67.220.220 9.228  
  208.67.220.220 9.858  
  208.67.222.222 9.657  
  平均 10.216 第4名
Comodo 8.26.56.26 31.415  
  8.20.247.20 29.311  
  8.20.247.20 27.540  
  8.26.56.26 26.266  
  平均 28.633 第9名
Norton 199.85.126.10 50.806  
  199.85.127.10 14.049  
  199.85.127.10 7.984  
  199.85.126.10 39.405  
  平均 28.061 第8名
Verisign 64.6.64.6 18.682  
  64.6.65.6 22.910  
  64.6.65.6 6.200  
  64.6.64.6 6.086  
  平均 13.469 第6名
Level3 209.244.0.3 18.189  
  209.244.0.4 14.277  
  209.244.0.4 11.591  
  209.244.0.3 10.461  
  平均 13.630 第5名
HiNet 16.95.1.1 4.935  
  168.95.192.1 5.541  
  168.95.192.1 6.195  
  168.95.1.1 6.714  
  平均 5.847 第3名

每一家的第一台測試時間大部份都比較久,除了 HiNet 自家 DNS
這種情況跟 cache 可能有關,照理說這些站都是很熱門的站,DNS上都會有 cache 資料
本次測試分別由 Cloudflare、Google、HiNet 拿下前三名,
因為用 HiNet 測試,HiNet 自家 DNS 有網路延遲優勢,可見 HiNet DNS 還有優化空間

RustDesk

RustDesk 使用上跟 Anydesk, Teamviewer 差不多,也是用 ID + Password 就可以連線 其優點是開源,可以自架 ID/Relay Server 在 Client 裝好的情況下,直接是可以使用的,預設應該是使用 RustDesk 的公共 Ser...