# NOC ## Issues - [ ] mail 亂碼 * 資安通報寄發信件使用 mutt 來寄發,使用的命令如下: `mutt -s "$Subject" $ContactEmail -c $RegEmail -b ncku_ee_nm_group@googlegroups.com < $securitymail_dir` `sudo ./mail_test.sh "NOC發信測試" "誰誰誰" "a12345678@gmail.com" -c "a12345678@gmail.com"` * 有時會出現亂碼,目前的解法是再按一次資安通報鎖定讓系統重發,還無法確定發生亂碼的原因,只知道是在轉成信件編碼的時候有 syntax error - [ ] NOC 系統備份(虛擬化) ## scripts ### 各資料夾內容 **重要資料夾** * `/etc/httpd` apache server 的設定檔在這資料夾內 - `conf.d/default.conf` : admin 頁面的存取權限 - `conf.d/phpMyAdmin.conf` : phpMyAdmin 存取權限 * `var/www/html/admin` - `application/view`: 網管系統管理者頁面,網頁呈現內容、函式都在這裡 - `application/config/route.php` - `/script`: 所有的腳本都在這邊, 如: `mailgen_arpa_security.sh` 按下資安通報鎖定後負責寄信的腳本, * 除 `var/www/html/admin` 外,也有資料夾是給非網管登入頁面,但忘了在哪個資料夾了 * `/usr/local/nmtools/`: 取得 router 資料、修改 router 資料的腳本都在這邊 - `/router_iparp`: 資料夾下放的是跟 router 資訊相關的腳本 - router_iparp.bash 裡面有放可以連線的 IP - `/router_iparp/router_iparp.bash`: 資安通報上鎖跑的腳本 - `/router_iparp/cmd`: 放一些取得用的腳本 ### 手動綁定 arp 按完鎖定也收到 NOC 寄發的通知卻還是未上鎖,手動下指令: `/var/www/html/admin/script/router_conf "arp $IP f44e.0507.d580 arpa" | grep -w arp` * $IP 填要上鎖的 IP ### 手動更新 IPv4 管理介面的 IPv4 使用者列表未更新(看最後上線時間),使用下列指令更新: `bash /usr/local/nmtools/router_iparp/router_iparp.bash` * ==當有新的 IP 加入後可能出現部分 IP 有更新,部分未更新的情況== * 修改 `/usr/local/nmtools/router_iparp/cmd/getinfo.expect.ssh` 的內容,此腳本會取得 router 資訊,透過 `\r` 逐步往下取,當`\r` 次數不夠時就不會取到完整的資料。 ### HTTPS 憑證更新 ```shell /bin/cp -f /etc/httpd/conf/httpd.conf.for_http /etc/httpd/conf/httpd.conf /bin/cp -f /etc/httpd/conf.d/ssl.conf_for_http /etc/httpd/conf.d/ssl.conf service httpd restart bash /root/letsnecrypt-renew.bash >> /var/log/le-lenew.log /bin/cp -f /etc/httpd/conf/httpd.conf.disable_http /etc/httpd/conf/httpd.conf /bin/cp -f /etc/httpd/conf.d/ssl.conf_for_https /etc/httpd/conf.d/ssl.conf service httpd restart ``` ### 幫老師增加IP 使用phpMyadmin IP table 在account欄位增加老師的英文名
×
Sign in
Email
Password
Forgot password
or
Sign in via Google
Sign in via Facebook
Sign in via X(Twitter)
Sign in via GitHub
Sign in via Dropbox
Sign in with Wallet
Wallet (
)
Connect another wallet
Continue with a different method
New to HackMD?
Sign up
By signing in, you agree to our
terms of service
.