在Debian系統中,防止Telnet被攻擊的方法主要有以下幾點:
禁用Telnet服務:
sudo systemctl stop telnet.socket
sudo systemctl disable telnet.socket
安裝并配置防火墻:
ufw
(Uncomplicated Firewall)來配置防火墻規則,阻止對Telnet端口(默認是23)的訪問。ufw
(如果尚未安裝):sudo apt update
sudo apt install ufw
sudo ufw enable
sudo ufw deny 23/tcp
使用SSH替代Telnet:
sudo apt update
sudo apt install openssh-server
sudo systemctl start ssh
sudo systemctl enable ssh
定期更新系統和軟件:
sudo apt update && sudo apt upgrade
監控和日志記錄:
rsyslog
或其他日志管理工具來監控和分析系統日志。通過以上措施,可以大大降低Debian系統中Telnet服務被攻擊的風險。