第 102 章 Ntop

简介:

102.1. Installation

102.1.1. Ubuntu

$ sudo apt-get install ntop
$ sudo apt-get install graphviz
			

设置管理员密码

	        
  ┌───────────────────────────┤ Configuring ntop ├───────────────────────────┐
  │ Please choose a password to be used for the privileged user "admin" in   │
  │ ntop's web interface.                                                    │
  │                                                                          │
  │ Administrator password:                                                  │
  │                                                                          │
  │ ________________________________________________________________________ │
  │                                                                          │
  │                                  <Ok>                                    │
  │                                                                          │
  └──────────────────────────────────────────────────────────────────────────┘


  ┌──────────────────────────┤ Configuring ntop ├───────────────────────────┐
  │ Please enter the same password again to verify that you have typed it   │
  │ correctly.                                                              │
  │                                                                         │
  │ Re-enter password to verify:                                            │
  │                                                                         │
  │ _______________________________________________________________________ │
  │                                                                         │
  │                                 <Ok>                                    │
  │                                                                         │
  └─────────────────────────────────────────────────────────────────────────┘
			
			

如果你忘记密码,可以使用下面命令重置密码

$ sudo ntop --set-admin-password
			
$ sudo /etc/init.d/ntop start
			

102.1.2. CentOS

5.x

wget http://packages.sw.be/rpmforge-release/rpmforge-release-0.5.2-2.el5.rf.i386.rpm
rpm -K rpmforge-release-0.5.2-2.el5.rf.i386.rpm
rpm -i rpmforge-release-0.5.2-2.el5.rf.i386.rpm
yum install ntop
			

设置管理员密码

# ntop -A
Tue May 22 13:03:34 2012  NOTE: Interface merge enabled by default
Tue May 22 13:03:34 2012  Initializing gdbm databases


ntop startup - waiting for user response!


Please enter the password for the admin user:
Please enter the password again:
Tue May 22 13:03:40 2012  Admin user password has been set
			

备份配置文件

# cp /etc/ntop.conf /etc/ntop.conf.old
			

/etc/sysconfig/iptables

-A RH-Firewall-1-INPUT -m state --state NEW -m tcp -p tcp --dport 3000 -j ACCEPT
service iptables restart
			

启动ntop

# /usr/bin/ntop -d -L -u ntop -P /var/ntop --use-syslog=daemon
or
# /usr/bin/ntop -d -L -u ntop -P /var/ntop --skip-version-check --use-syslog=daemon
			

/etc/init.d/ntop 脚本有bug无法启动,需要如下修改

# vim /etc/init.d/ntop
start () {
    echo -n $"Starting $prog: "
    #daemon $prog -d -L @/etc/ntop.conf
    daemon $prog  @/etc/ntop.conf
			




原文出处:Netkiller 系列 手札
本文作者:陈景峯
转载请与作者联系,同时请务必标明文章原始出处和作者信息及本声明。

目录
相关文章
|
2月前
|
网络协议 Unix Linux
`AF_INET`
`AF_INET`
18 3
|
2月前
|
网络协议 Linux C++
Linux C/C++ 网络编程中地址格式转换(inet_pton和inet_ntop函数)
Linux C/C++ 网络编程中地址格式转换(inet_pton和inet_ntop函数)
27 0
|
2月前
|
Unix API
SOCK_DGRAM
SOCK_DGRAM
16 2
|
2月前
|
网络协议 Unix API
`AF_INET6`
`AF_INET6`
21 2
|
10月前
|
安全
|
API
错误 C4996 ‘inet_ntoa‘: Use inet_ntop() or InetNtop() instead or define _WINS
错误 C4996 ‘inet_ntoa‘: Use inet_ntop() or InetNtop() instead or define _WINS
993 0
|
数据安全/隐私保护 网络协议 Ubuntu