2014年4月10日 星期四

重簽 Godaddy SSL 憑證 (re-keying an SSL Certificate)

熱門議題 OpenSSL Security Advisory [07 Apr 2014] / CVE-2014-0160 的影響,要把所以 Web Server 用的 HTTPS 重新整理,由於使用 Godaddy 維護 SSL 憑證,所以,直接看 Godaddy 流程:Re-Keying an SSL Certificate

  1. Log in to your SSL Manager.
  2. Go to the Manage Certificates tab.
  3. In the Filters list, click Certificates.
  4. Select the certificate(s) you want to re-key, and then click Re-Key. The Re-Key Certificate page displays.
  5. If your domain name uses our shared hosting, and you want to switch to third-party hosting or one of our virtual private or dedicated servers: For What would you like to do?, select Un-install this certificate.
  6. In the CSR field, paste your new CSR, including ----BEGIN NEW CERTIFICATE REQUEST---- and ----END CERTIFICATE REQUEST----.
  7. Select a Signature algorithm and a Certificate issuing organization, and then click Re-Key. We'll send you an email message with instructions to validate and download your certificate.

NOTE: This operation removes your existing SSL certificate from your shared hosting account, causing temporary website downtime for up to 72 hours.

[Linux] 更新 OpenSSH Server Key @ Ubuntu 12.04

由於熱門議題 OpenSSL Security Advisory [07 Apr 2014] / CVE-2014-0160 的影響,只好重新處理一下 OpenSSH Server key 了:

$ lsb_release -a
Distributor ID: Ubuntu
Description: Ubuntu 12.04.4 LTS
Release: 12.04
Codename: precise
$ sudo rm /etc/ssh/ssh_host_*
$ sudo dpkg-reconfigure openssh-server

2014年4月9日 星期三

拆錶蓋 換電池 修錶工具組



說真的...覬覦這東西很久了 XD 以前都是用類似鑷子的東西,盡可能把錶蓋轉開,後來這次找不到鑷子,又發現附近的雜貨店賣一隻都快百元了,所以,就等一整組的工具組吧!

其實火車站附近的光X文具店也有在服務,分開收電池跟服務費(印象中是50元),那換 2~3 次就可以買一組工具了,於是就嘗試找看看吧!


這整組是在網拍買的(含運約150元),用 "拆錶" 關鍵字去搜尋就可以找到了。妙的是我親自跑了附近的鐘錶批發,一樣的東西都喊400元起跳 Orz 或是單一隻拆錶後蓋的都 80 起跳,真的貴不少。

有興趣的就去網拍逛逛吧,直接跑店家買不見得可以便宜到,或許是因為非熱門玩物吧?

[Linux] Proftp Quota 筆記 @ Ubuntu 12.04

由於採用 Virtual FTP User 的關係,試用一下 Proftp Quota 的服務:

$ cd /etc/proftpd/
$ sudo ftpquota --create-table --type limit
$ sudo ftpquota --create-table --type tally
$ ls -la
ftpquota.limittab
ftpquota.tallytab


$ sudo vim /etc/proftpd/proftpdc.conf
#<IfModule mod_quotatab.c>
#QuotaEngine off
#</IfModule>
$ sudo vim /etc/proftpd/conf.d/QuotaUsage.conf
<IfModule mod_quotatab.c>
QuotaEngine on
QuotaLimitTable file:/etc/proftpd/ftpquota.limittab
QuotaTallyTable file:/etc/proftpd/ftpquota.tallytab
QuotaShowQuotas on
QuotaDisplayUnits Mb
QuotaOptions ScanOnLogin
</IfModule>

$ sudo service proftpd restart


測試:

$ ftp localhost 21
ftp> quote site quota
202 No quotas in effect


試看看限定所有人只能上傳 20GB:

$ sudo ftpquota --table-path /etc/proftpd/ftpquota.limittab --add-record --type limit --quota-type all --units Gb --bytes-upload 20
$ sudo service proftpd restart


$ ftp localhost 21
ftp> quote site quota
200-The current quota for this session are [current/limit]:
200-Name: username
200-Quota Type: User
200-Per Session: False
200-Limit Type: Hard
200-  Uploaded Mb:              0.00/20480.00
200-  Downloaded Mb:    unlimited
200-  Transferred Mb:   unlimited
200-  Uploaded files:   unlimited
200-  Downloaded files: unlimited
200-  Transferred files:        unlimited
200 Please contact root@server if these entries are inaccurate

Linode Resize 筆記



上回在研究 Linode Resize 時,發現他的過程是將機器關機、資料移轉、開機,因此最後沒有採用。這次有台偏 testing 的機器,服務性質上恰好可以承受 donwtime 時間,就來試試了!

過程如之前所料的,先關機再移機,以官方公佈的資訊為例,從 Linode 1G 移機 resize 需要耗時 36 分鐘,此時間會跟 Linode 上選的方案有關,因為每個方案的 Storage 大小不一樣。

整體上,所耗的時間主要就是在搬移資料,至於搬移的速度嘛,據觀察一開始每秒 18MB/s,但之後可飆到 66MB/s,所以原先 Linode 1G 方案有 48 GB 儲存空間,以 50MB/s 算一下就是 15~20 分鐘,而實際移轉過程也可以線上觀看 Host Job Queue,項目名稱:Migrate Filesystem。



別忘了,做完 Resize 後要自己重開機!此次從 Linode 1G 升到 Linode 4G 耗時約 15 分鐘。




註:Linode Resize 完,Disk 也要自己 Resize 才行 Orz 所以又關機了一次