2017年6月29日 星期四

Mac mini server 忘記密碼

reboot

command + s

/sbin/mount -uw /

rm /var/db/.AppleSetupDone

reboot

XSVR-106-000-R-LN2-VLQ-PRW-H6C-44L-XH2-P

2017年6月16日 星期五

MAC 中毒

天啊...MAC 也會中毒

處理方式, 保存一下

https://www.cool3c.com/article/124185

http://zeekmagazine.com/archives/37152


centos 7 linux proxy squid

架個 Proxy 吧...
centos 7 + squid

PS
小弟因為懶都關閉 firewall and selinux

安裝 squid
~]# yum install squid

修改一下設定,
哇, 這個版本的設定檔已經變得很精簡了...

~]# vim /etc/squid/squid.conf

設定快取大小, 就給他 2G 吧
使用預設 Port ( 3128 )


啟動 squid
~]# systemctl start squid

開機自動啟動
~]# systemctl enable squid

找一台電腦設定 proxy
略

檢查是否OK
# tail -f /var/log/squid/access.log


常用參數~~~
想到到在加囉

2017年6月15日 星期四

CentOS 7 Clamav install from EPEL

Install Clamav from EPEL
# yum install epel-release

安裝 Clamav
# yum install clamav clamav-update

更新病毒碼
修改更新病毒碼設定檔
# vim /etc/freshclam.conf
將 Example 刪除或註解

SafeBrowsing
SafeBrowsing 是 google 提供的惡意 URL 的掃描,預設 disable ,我基本上是會打開
預設關閉
刪除 # 取消註解來開啟 SafeBrowsing


:wq
存檔離開,基本上我們就完成了更新病毒碼的設定

手動更新病毒碼
# freshclam

掃毒測試
下載測試病毒 eicar.com
# curl -O http://www.eicar.org/download/eicar.com
掃描現在的路徑
# clamscan --infected --remove --recursive .
掃描完成




自動更新病毒碼
我個人使用 crontab 每小時更新一 次
# crontab -e
0       *       *       *       *       /usr/bin/freshclam --quiet

2017年6月14日 星期三

Windows update 80072EFD

今天發現有電腦 windows update error 80072EFD,最後竟然是 proxy 造成 update 失敗...

這.....

等等去看 squid 上的 log 吧...