Welcome 微信登录
编程资源 图片资源库 蚂蚁家优选 PDF转换器

首页 / 操作系统 / Linux / Linux下防止未授权IP使用ssh服务

Linux下防止未授权IP使用ssh服务方法一iptables -A INPUT -p tcp -s 192.168.0.0/24 --destination-port 22 -j ACCEPTiptables -A INPUT -p tcp -s 192.168.1.0/24 --destination-port 22 -j ACCEPTiptables -A INPUT -p tcp -s ! 127.0.0.1 --destination-port 22 -j DROP方法二[root@nihao ~]# more /etc/hosts.deny## hosts.deny    This file describes the names of the hosts which are#               *not* allowed to use the local INET services, as decided#               by the "/usr/sbin/tcpd" server.## The portmap line is redundant, but it is left to remind you that# the new secure portmap uses hosts.deny and hosts.allow.  In particular# you should know that NFS uses portmap!sshd: ALL : deny[root@nihao ~]# more /etc/hosts.allow## hosts.allow   This file describes the names of the hosts which are#               allowed to use the local INET services, as decided#               by the "/usr/sbin/tcpd" server.#sshd: 192.168.0.230 :allow这里写允许的ip或者网段经验总结:Linux桌面使用技巧集锦Termcolor —— 用 Python 打出彩色Linux终端信息相关资讯      SSH  Linux安全 
  • SSH/SSL 源码编译安装简易操作说明  (今 07:03)
  • Mac使用ssh出现permission denied(  (03月23日)
  • Mac OS X下配置远程Linux 服务器  (12/22/2015 15:21:41)
  • Teleport:面向集群及团队的 SSH  (04月11日)
  • 如何在 CentOS / RHEL 上设置 SSH   (01月18日)
  • SSH相互信任配置  (12/20/2015 19:58:17)
本文评论 查看全部评论 (0)
表情: 姓名: 字数