Home | Mirror | Search

9. Ntop

ntop - display network usage in web browser

9.1. Installation

9.1.1. Ubuntu

$ sudo apt-get install ntop
			

設置管理員密碼

	                                                                                
  ┌───────────────────────────┤ 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
			

9.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
			

9.2. Web UI

http://localhost:3000/

9.3. Plugins

9.3.1. NetFlow

comments powered by Disqus