telnet服務(wù)安裝
- 通過(guò)yum安裝
yum install telnet telnet-server xinetd -y
- 啟動(dòng)xinetd服務(wù)薇宠,用于監(jiān)聽(tīng)端口
systemctl start xinetd.service
- 啟動(dòng)telnet服務(wù)
systemctl start telnet.socket
- 通過(guò)iptables,將telnet允許通過(guò)
# 查看telnet的默認(rèn)端口
grep telnet /etc/services
# 1. 直接修改iptables
iptables -I INPUT -p tcp --dport 23 -j ACCEPT
iptables -vnL | grep 23
# 2. 通過(guò)firewall
firewall-cmd --permanent --add-port=23/tcp
firewall-cmd --reload
firewall-cmd --list-all