postfix 關於rate limit設定

一些基本限制相關連線的基本設定

##
## 效能調教, 視情況修改
##
#default_process_limit = 150
#qmgr_message_active_limit = 40000
#qmgr_message_recipient_limit = 40000
#default_destination_concurrency_limit=100
#default_destination_recipient_limit=100
#default_process_limit=200
#smtp_mx_session_limit=100
#smtp_destination_concurrency_limit=100
#maximal_backoff_time = 1000s
#minimal_backoff_time = 300s

##
## 阻擋惡意連線
## 
smtpd_error_sleep_time = 1s
smtpd_soft_error_limit = 10
smtpd_hard_error_limit = 20

##
## 用戶端每60秒,最多連線20次, 且同時只能10個連線
##
anvil_rate_time_unit=60s
smtpd_client_connection_rate_limit=20
smtpd_client_connection_count_limit=10

,

tomcat 8 預設welcome檔案所在目錄

在tomcat server裡, 程式專案預設放在 webapps 目錄底下, 假設專案為 guacamole.
程式會放在 webapps/guacamole , 網址則為 http(s)://x.x.x.x/guacamole

若想直接輸入 http(s)://x.x.x.x , 自動引導入到 http(s)://x.x.x.x/guacamole , 則必須在 webapps 建立ROOT目錄, 以及在ROOT目錄下, 建立 index.html , index.htm, 或 index.jsp 這三種任一種welcome 檔案.

docker 容器的酪梨醬(guacamole 1.4.0 版本), tomcat 設定檔案在 /home/guacamole/tomcat 底下, 請建立一個含以下內容的 tomcat/webapps/ROOT/index.html 檔案即可.

<!DOCTYPE html>
<html>
  <head>
    <meta http-equiv="refresh" content="0; url='https://x.x.x.x/guacamole'" />
  </head>
  <body>
    <p>Please follow <a href="https://x.x.x.x/guacamole">this link</a>.</p>
  </body>
</html>

酪梨醬(guacamole apache)更新到1.4.0, 輸入法問題解決了?

酪梨醬(https://guacamole.apache.org/)是非常好用的遠端連線工具,可以讓員工輕輕鬆鬆在家,透過瀏覽器遠距辦公,而且不需要額外安裝vpn或是其他連線軟體;但酪梨醬最煩人的就是中文輸入法很難切換,用戶端的作業系統與遠端的主機作業系統,常常不一致,導致輸入有問題,必須改用滑鼠點選切換中英文,而不能用平常shift鍵切換,今天升級到1.4.0 發現這個問題似乎得到解決, 實在太棒了。

2024/03/07
後來發現還是沒解決,但我苦思很久最近突然有所感悟,居然突破僵化的思維了,方法簡單,只要”停掉”本機的中英文切換鍵「shift」就可以了(左撇子關右邊,右撇子關左邊),可惜這個方法只解一半,使用遠端連線完畢,本機的shift鍵需要改回來,但我已經很滿意了,至少不會因為頻繁切換中英文,點滑鼠點到非常生氣(畢竟不是常用的切換方式);若習慣使用ctrl-space切換中英文的人,也沒關係,停用本機shift後,以後連到遠端就改用shift切換即可。

2024/03/21
我寫了一個windows簡單的程式(x64),可以暫時解決輸入法切換問題,論述基礎為修改windows註冊表
程式也開源:https://github.com/WilliamFromTW/ApacheGuacamoleIMEswitch
點此下載程式

2024/03/22
改成開啟酪梨醬遠端連線時,系統會先自動停用本機左邊shift鍵(當然也自行可以手動停用),等到關閉程式時,會恢復左邊shift鍵。

esxi 7.0 製作客製iso

esxi 7 之後, 原本可以加掛螃蟹卡方式就失效了, 還需要高人提出解法, intel倒是有熱心人提出解法.

所以一般主機若要使用esxi 7.0 , 只能購買較高級網卡,如intel, 或是usb網卡, 購買之後, 一樣要掛載坊間製作的驅動才有用.

  1. 下載已做好的iso檔案
  2. 手動製作

先下載intel驅動程式 , 與最新版depot.zip 再修改以下指令製作(紅色部分須注意修改)

$EsxiDepot="VMware-ESXi-7.0U3f-20036589-depot.zip"
$EsxiProfile="ESXi-7.0U3f-20036589-standard"
$NewEsxiProfile="ESXi-7.0U3f-20036589-NUC"

#加上檔案名稱(從官網下載,需要登入,以及申請測試)
Add-EsxSoftwareDepot .\$EsxiDepot

#加上客製intel驅動程式
Add-EsxSoftwareDepot .\Net-Community-Driver_1.2.7.0-1vmw.700.1.0.15843807_19480755.zip

# 可下指令 Get-EsxImageProfile 取得 profile name 以及 vendor name
New-EsxImageProfile -CloneProfile "$EsxiProfile" -name "$NewEsxiProfile" -Vendor "virten.net"

# "net-community"為額外下載intel驅動程式名稱
Add-EsxSoftwarePackage -ImageProfile "$NewEsxiProfile" -SoftwarePackage "net-community"

Export-ESXImageProfile -ImageProfile "$NewEsxiProfile" -ExportToISO -filepath "$NewEsxiProfile.iso"

ssh 用戶端不支援舊版加密解法

新的ssh 用戶端已經不支援舊版的加密方式, 因此若伺服器提供的sshd 加密過舊, 則必須手動調整,讓ssh 用戶端強制使用舊版方式連線.

做法就是先確認伺服器提供的加密法

# ssh -l root 192.168.1.1
Unable to negotiate with 192.168.1.1 port 22: no matching key exchange method found. Their offer: diffie-hellman-group-exchange-sha1,diffie-hellman-group14-sha1,diffie-hellman-group1-sha1

然後請視情況(錯誤訊息), 更改演算法與支援的key

ssh -oKexAlgorithms=+diffie-hellman-group1-sha1 -oHostKeyAlgorithms=+ssh-dss -l root  x.x.x.x 

若連線還是失敗, 出現以下錯誤

ssh_dispatch_run_fatal: Connection to 192.168.1.1 port 22: error in libcrypto

用戶端嘗試執行以下指令

update-crypto-policies --set LEGACY
1 ... 15 16 17 18 19 ... 57