Pages: 14/48 First page Previous page 9 10 11 12 13 14 15 16 17 18 Next page Final page [ View by Articles | List ]

TCP_Wrappers的语法格式

[不指定 2009/04/01 15:19 | by askwan ]
   TCP_Wrappers和iptables是linux下最重要的两个安全方面的项目,不容忽视,反复测试后发现TCP_Wrappers的/etc/hosts.allow 和/etc/hosts.deny 是不支持CIDR方式的写法的(如192.168.0.0/24, 172.16.0.0/16等)!
某些文章和资料书籍里面有这种写法是错误的,要注意了。
  
  其写法支持如
1.   .askwan.com
包括askwan.com自身以及 其下所有子域名

2. 192.168.
包括192.168. 下的所有ip

3. 10.10.0.0/255.255.0.0

4. ALL
包括系统所有daemon 和所有IP段

5. userX@askwan.com
指示某个域名主机里某个特定用户

6. EXCEPT 语法
例如: 要求192.168.0.0/255.255.255.0 下的除了 192.168.0.100 之外的机器可以使用sshd服务,那么可以写为
sshd:192.168.0.0/255.255.255.0 EXCEPT 192.168.0.100      

一点补充内容:
    TCP_Wrappers可以使用系统中的twist 和 spawn 记录和追踪来访者的信息,以作为系统安全日志分析
,有几个常用变量可以使用

%a    Client address
%h    Client host name
%A    Host address
%H    Server host name
%c    Client information
%p    Process ID
%d    Process name
%s    Server information


GPT (GUID Partition Table)

[不指定 2009/03/29 13:26 | by askwan ]
       Linux早可以支持大于2T的块设备(Large Block Device),但是分区的时候却不能用常见的fdisk工具了,一定要用的话,会有下面的警告信息:
Quotation
[root@host2001 data]# fdisk -l

Disk /dev/sda: 500.1 GB, 500107862016 bytes
255 heads, 63 sectors/track, 60801 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *           1          33      265041   83  Linux
/dev/sda2              34       12781   102398310   83  Linux
/dev/sda3           12782       14056    10241437+  82  Linux swap / Solaris

WARNING: GPT (GUID Partition Table) detected on '/dev/sdc'! The util fdisk doesn't support GPT. Use GNU Parted.

Disk /dev/sdc: 2500.1 GB, 2500140728320 bytes
255 heads, 63 sectors/track, 303958 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes


上面提示fdisk工具不支持GPT,得使用另一个GNU发布的强大分区工具parted
官方链接:http://www.gnu.org/software/parted/index.shtml
若强制用fdisk分区,最后大于2T的部分系统会不能认出来!

而GPT,比较权威的解释是:
Quotation
In computer hardware, GUID Partition Table (GPT) is a standard for the layout of the partition table on a physical hard disk. It is a part of the Extensible Firmware Interface (EFI) standard proposed by Intel as a replacement for the PC BIOS, one of the few remaining parts of the original IBM PC. EFI uses GPT whereas BIOS uses a Master Boot Record (MBR)

下面的图说明了其结构:
Open in new window
要详细了解这家伙,这篇文章或许可以帮助你:http://developer.apple.com/technotes/tn2006/tn2166.html

关于parted的用法和信息可以参看GUN专门文档:http://www.gnu.org/software/parted/manual/parted.html
就不演示了。今天正好碰到一客户遇到的这个问题,记下来给准备使用大于2T块设备的l网友一点提示。
Tags: , , ,

RHEL5建立自己的yum源服务器

[不指定 2009/03/22 00:17 | by askwan ]
     为了解决软件包的依赖问题,红帽系列发行版最好的方式是利用yum,但用红帽子的yum源安装软件有诸多限制,弃之,还有两种方法,一个是用centos对应版本的yum源,不过centos一般都是慢rhel半拍才出来,第二是自己用rhel安装光盘文件里的文件构建yum源,这里以http方式(还可以本地光盘方式,本地文件方式),本文记录简要过程,仅供参考。
      
    1.挂载安装光盘到系统

mount /dev/cdrom /media/


      2.复制文件到web服务器rhel5目录下

cp -fr /media/* /var/www/htm/rhel5


      3.重建记录分组文件
  首先,确认系统已经安装createrepo包。
Tags: , ,

出差河南郑州

[不指定 2009/03/20 20:30 | by askwan ]
本周出差河南郑州

上海虹桥国际机场候机室
Open in new window
Pages: 14/48 First page Previous page 9 10 11 12 13 14 15 16 17 18 Next page Final page [ View by Articles | List ]