Chinaunix首页 | 论坛 | 博客
  • 博客访问: 5741637
  • 博文数量: 675
  • 博客积分: 20301
  • 博客等级: 上将
  • 技术积分: 7671
  • 用 户 组: 普通用户
  • 注册时间: 2005-12-31 16:15
文章分类

全部博文(675)

文章存档

2012年(1)

2011年(20)

2010年(14)

2009年(63)

2008年(118)

2007年(141)

2006年(318)

分类: 网络与安全

2006-07-08 17:14:01

Hardening Linux 读书笔记(二)


1、让机器脱离网络

实际上不需要将网线拔掉,可以卸掉网卡。

ifconfig eth0 down


2、禁止不必要的服务

Linux启动守护进程的脚本一般存在/etc/init.d或者是/etc/rc.d目录下。

有一类服务使用Internet守护进程负责启动。在DebianSuse中的Internet守护进程名称是inetd,它的配置文件在/etc/inetd.confRedHat的名称叫xinetd,它的配置文件保存在/etc/xinetd.d目录下。


常见的Linux发行版的启动脚本的修改工具

发行版本

服务配置工具

Debian

rcconf chkconfig

RedHat

ntsysv serviceconf chkconfig

SUSE

YaST2 chkconfig


chkconfig的使用方法:

列出所有的守护进程

chkconfig –list | more

列出某一个服务的信息

chkconfig –list program-name

关闭或者打开某项服务

chkconfig –level 2345 sendmail off/on


通过修改启动脚本

ln -s script-to-link-to soft-link-to-make


其他:

查看系统服务:

/etc/services文件

查看每个进程:

ps aux || grep -v grep | grep firefox

查看网络连接:

netstat -ap | grep -i listen | more


阅读(1282) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~