preload
Apr 16
sudo vi /etc/hosts.allow

設定允許連線的 IP

sshd:123.123.123.123

sudo vi  /etc/hosts.deny

設定拒絕連線的 IP
sshd:all
這樣一來只有 123.123.123.123 可以用 ssh 連進來了。

設定完馬上在 secure.log 看到成效了

sudo tail -f /var/log/secure.log

Apr 16 19:02:44 G3 sshd[867]: refused connect from 220.130.168.225
Apr 16 19:17:41 G3 sshd[890]: refused connect from 219.158.166.242
Apr 16 19:20:39 G3 sshd[892]: refused connect from 222.255.236.10

溫故知新

載入中…

歷史上的今天..

相關文章:

Tagged with:

Leave a Reply