易截截图软件、单文件、免安装、纯绿色、仅160KB

Linux系统管理 安全篇 之开放端口

查看系统中开放的端口,关闭不需要的端口和程序,如下例中操作流程:
1. 查看对外开启的端口:
[root@mail ~]# nmap 127.0.0.1 #注:此处应该换作公网ip
Starting Nmap 4.11 ( http://www.insecure.org/nmap/ ) at 2010-04-20 11:06 CST
Interesting ports on 127.0.0.1
Not shown: 1668 closed ports
PORT     STATE SERVICE
22/tcp   open  ssh
25/tcp   open  smtp
80/tcp   open  http
1010/tcp open  unknown
2. 对不明端口进行查访
[root@mail ~]# netstat -anlp | grep 1010
tcp        0      0 0.0.0.0:1010                0.0.0.0:*                   LISTEN      3796/rpc.statd
#
#[root@mail ~]# lsof -p 3796
#
#
[root@mail init.d]# which rpc.statd
/sbin/rpc.statd
[root@mail ~]# rpm -qf /sbin/rpc.statd
nfs-utils-1.0.9-40.el5
[root@mail init.d]# ll /etc/init.d/nfs*
-rwxr-xr-x 1 root root 4668 Jan 21  2009 /etc/init.d/nfs
-rwxr-xr-x 1 root root 3465 Jan 21  2009 /etc/init.d/nfslock
[root@mail init.d]# service nfs status
rpc.mountd is stopped
nfsd is stopped
rpc.rquotad is stopped
[root@mail ~]# /etc/init.d/nfslock status
rpc.statd (pid 3796) is running...
3. 关闭不相干的应用
[root@mail init.d]# service nfslock
Usage: /etc/init.d/nfslock {start|stop|status|restart|probe|condrestart}
[root@mail init.d]# service nfslock stop
Stopping NFS statd:                                        [  OK  ]
4. 关闭不相干的服务
[root@mail init.d]# chkconfig --level 345 nfslock off


相关文档:

彻底解决linux下 GB2312 显示错误问题

打开 /etc/sysconfig/i18n
输入
LANG="zh_CN.GB2312"
LANGUAGE="zh_CN.GB18030:zh_CN.GB2312:zh_CN"
SUPPORTED="zh_CN.GB18030:zh_CN:zh:en_US.UTF-8:en_US:en"
SYSFONT="lat0-sun16"
好了 ......

linux内核源码中常见宏定义

1. gcc的__attribute__编绎属性
要了解Linux Kernel代码的分段信息,需要了解一下gcc的__attribute__的编绎属性,__attribute__主要用于改变所声明或定义的函数或数据的特性,它有很多子项,用于改变作用对象的特性。比如对函数,noline将禁止进行内联扩展、noreturn表示没有返回值、pure表明函数除返回值外,不会通过其它 ......

Linux内核态下的文件操作

在VFS的支持下,用户态进程读写任何类型的文件系统都可以使用read和write着两个系统调用,但是在linux内核中没有这样的系统调用我们如何操作文件呢?我们知道read和write在进入内核态之后,实际执行的是sys_read和sys_write,但是查看内核源代码,发现这些操作文件的函数都没有导出(使用EXPORT_SYMBOL导出),也就是说在内核 ......

[高性能技术] Linux2.6内核epoll介绍(0.1版本)

[高性能技术] Linux2.6内核epoll介绍(0.1版本)
转自: http://mechgouki.blogdriver.com/mechgouki/601157.html
[作者]:滕昱,2005/3/30,0.1版本
[版权声明]:此文档遵循GNU自由文档许可证(GNU Free Documentation License).任何人可以自由复制,分发,修改,不过如果方便,请注明出处和作者:)
(1)导言:
首先,我强烈建议 ......

LINUX下的iptables

原帖:http://www.cnscn.org/read.php?tid-44684.html
iptables有三种链
1:INPUT (进来的链)
2:OUTPUT(出去的链)
3:FORWARD(转发的链)
iptables -A INPUT -p icmp -j DROP
-A(添加一个链) -p 协议 -j(添加动作) 说明添加一个进来的链。协议是icmp动作拒绝。
iptables -L -n (用树形结构来看一下iptables的设置)
......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号