在网上给找了一个,你自己看看吧。呵呵
二、IBM AIX
2.1 /etc/security/user
/etc/security/user配置文件包含用户的扩展属性,出于AIX系统安全考虑,需要使某些用户只能在控制台登录使用,而不允许远程登陆使用。处理方法: 更改/etc/security/user 文件中需要限制的用户的rlogin属性(rlogin = false)。当再次尝试远程登录时,系统报错:Remote logins are not allowed for this account ,表示修改成功。
AIX系统可以针对设备端口(/dev/pts)进行限制,但是对我们的需求来讲,似乎用途不大,这里仅做介绍。可以编辑/etc/security/user文件,例如:
test:
admin = false
admgroups = system
ttys = !/dev/pts/0,ALL
结果是用户test可以在除了pts/0以外的所有端口登录,当test在pts/0登录时, 系统报错:You are not allowed to access the system via this terminal。
AIX操作系统支持静态的IP包过滤功能,可以利用这一功能来保护连接在网络上的服务器。但是与HP-UX不同,缺省安装是不具备此功能的,在使用这一功能之前,需要安装以下文件集(filesets),如果文件集不存在,请安装这些文件集,然后重新启动机器。
# lslpp -l bos.net.ipsec.rte
Fileset Level State Description
----------------------------------------------------------------------------
Path: /usr/lib/objrepos
bos.net.ipsec.rte 5.3.0.20 COMMITTED IP Security
# lslpp -l bos.net.ipsec.keymgt
Fileset Level State Description
----------------------------------------------------------------------------
Path: /usr/lib/objrepos
bos.net.ipsec.keymgt 5.3.0.20 COMMITTED IP Security Key Management
下面开始对IP security进行配置(以FTP服务为例,TELNET等其他端口的服务类似)
1. 启动IP安全(IPSec):
# smitty ipsec4-> Start/Stop IP Security----> Start IP Security ->Start IP Security
2. 检查ipsec是否可用:
# lsdev -Cc ipsec
ipsec_v4 Available IP Version 4 Security Extension
3. 现在系统中应创建了两个过滤规则。使用下面的命令检查这两个过滤规则:
# lsfilt -v4
正常情况下可以看到2条规则,如果提示无任何缺省规则,请参考本节的注解。
4. 增加一个过滤规则以允许接受从10.152.129.49发来的ftp请求:
# smitty ipsec4---> Advanced IP Security Configuration------> Configure IP Security Filter Rules---------> Add an IP Security Filter Rule ->Add an IP Security Filter Rule
* Rule Action -----------------------------------[permit] +
* IP Source Address -----------------------------[10.152.129.49]
* IP Source Mask --------------------------------[255.255.255.255]
IP Destination Address --------------------------[]
IP Destination Mask ---------------------------- []
* Apply to Source Routing? (PERMIT/inbound only) [yes]+
* Protocol --------------------------------------[all]+
* Source Port / ICMP Type Operation -------------[any]+
* Source Port Number / ICMP Type ----------------[0] #
* Destination Port / ICMP Code Operation --------[eq]+
* Destination Port Number / ICMP Type -----------[21] #
* Routing ---------------------------------------[both] +
* Direction -------------------------------------[both]+
* Log Control -----------------------------------[no]+
* Fragmentation Control -------------------------[0]+
* Interface -------------------------------------[all] +
其他缺省值
5. 增加另一个过滤规则以拒绝其它所有向10.110.157.151发出的ftp请求:
Add an IP Security Filter Rule
* Rule Action -----------------------------------[deny]+
* IP Source Address -----------------------------[0.0.0.0]
* IP Source Mask --------------------------------[0.0.0.0]—
IP Destination Address ------------------------[10.110.157.151]—
IP Destination Mask ---------------------------[255.255.255.255] *
Apply to Source Routing? (PERMIT/inbound only) [yes] +
* Protocol --------------------------------------[all]+
* Source Port / ICMP Type Operation -------------[any] +
* Source Port Number / ICMP Type ----------------[0] #
* Destination Port / ICMP Code Operation --------[eq]+
* Destination Port Number / ICMP Type -----------[21]#
* Routing ---------------------------------------[both]+
* Direction -------------------------------------[both]+
* Log Control -----------------------------------[no] +
* Fragmentation Control ------------------------ [all packets]+
* Interface ------------------------------------ [all] +
6. 激活设置的过滤规则:
# smitty ipsec4---> Advanced IP Security Configuration----> Activate/Update/Deactivate IP ---->Security Filter Rule ---------> Activate / Update
7. 上面的操作进行完后,用户将只能从10.152.129.49 ftp至 10.110.157.151,任何其它机器试图ftp至10.110.157.151的操作将失败。
注:步骤3所涉及的,任何机器都有这两条默认规则。规则1是允许IPSec跟其他设备通讯的一个规则。NewOak公司制订了IPSec的规则,利用4001端口和别的利用IPSec的设备通信,现在保留这个通信信息,是为了历史兼容。 规则2保证默认情况下,所有网络传输可以正常进行。当安装完操作系统后是肯定存在的。但是部分局点执行lsdev-Cc ipsec发现
ipsec_v4 Available
Cannot get IPv4 default filter rule.
Cannot change default rule for IPv4 in ODM.
Cannot get IPv4 default filter rule
可能是因为在smitty ipsec4菜单当中,这两条规则是被当作普通规则,可能安装后被认为删除了。出现这种情况,你是无法进行设置任何新的规则的。如果希望修复该规则并回到缺省状态,可以使用smitty remove 删除对应的文件包,然后从安装光盘安装该包。并且打补丁到最新就可以解决
2.2 FTP服务
可通过以下两种方法进行限制:
1、直接编辑 /etc/ftpusers 文件,将被禁止进行ftp至AIX服务器操作的用户名列在该文件中,每个用户名列一行。
# vi /etc/ftpusers
2、通过SMIT菜单设置:
smitty ---> Communications Applications and Services ---> TCP/IP ---> Further Configuration ---> Server Network Services ---> Remote Access --->
Restrict File Transfer Program Users (/etc/ftpusers) ---> Add a Restricted User
* Name of Local USER ID [tstusr] <-- 在此处输入要限制的用户名。
收起