linux上samba服务的IPC$空连接入侵防范

转载 2015年07月08日 09:35:54

The IPC$ share allows users to anonymously fetch a list of shared resources from a server. It can be used as a point of attack into a system. How do I disable or limit IPC$ under Samba to certain subnet such as 10.0.0.0/8?

You can easily limit access to the IPC$ share under Samba using hosts allow and hosts deny feature. Another option is firewall samba port and limit access within your own subnet so that only machines in your network will be able to connect to it. Open smb.conf and make [IPC$] set it as follows:

 
     [IPC$]
       hosts allow = 10.0.0. 127.0.0.1
       hosts deny = 0.0.0.0/0
 

Save and close the file. Restart samba:
/etc/init.d/smb restart

Use iptables to restrict access

You can also add something as follows to your iptables script (/etc/sysconfig/iptables under CentOS / RHEL / Fedora Linux)

 
-A RH-Firewall-1-INPUT -s 10.0.0.0/8 -m state --state NEW -p tcp --dport 137 -j ACCEPT
-A RH-Firewall-1-INPUT -s 10.0.0.0/8 -m state --state NEW -p tcp --dport 138 -j ACCEPT
-A RH-Firewall-1-INPUT -s 10.0.0.0/8 -m state --state NEW -p tcp --dport 139 -j ACCEPT
-A RH-Firewall-1-INPUT -s 10.0.0.0/8 -m state --state NEW -p tcp --dport 445 -j ACCEPT
 

Save and close the file. Restart iptables:
# service iptables restart


http://www.cyberciti.biz/faq/samba-restrict-access-to-ipc-share/


相关文章推荐

linux下那些服务可以禁用掉

我的CentOS 6.0的ntsysv的配置,以下Enable,其它全disable:wr NetworkManager/ acpid/ auditd/ autofs/ haldaemon/ i...

Linux IPC资源清理

记录一下前几天遇到的一个问题及其解决方法。 escrow 环境启动不了,error_log提示“No spaceleft on device: mod_rewrite: could not crea...

linux_samba服务配置

  • 2013-04-21 13:09
  • 1.02MB
  • 下载

使用SSH客户端远程登录Linux主机(可替代samba、ftp服务)

Linux系统起初就是为多用户而产生的,可以允许多个用户同时登录linux主机各自进行操作,如图1所示:                           图1 ...

Linux Samba服务配置

1,Samba概述Samba是一个能让Linux系统应用Microsoft网络通讯协议的软件,而SMB是Server Message Block的缩写,即为服务器消息块 ,SMB主要是作为Micros...
内容举报
返回顶部
收藏助手
不良信息举报
您举报文章:深度学习:神经网络中的前向传播和反向传播算法推导
举报原因:
原因补充:

(最多只允许输入30个字)