xxqyzsc 发表于 2019-1-26 11:55:58

Ntop的安装与配置

# yum localinstall --nogpgcheck GeoIP-1.4.7-0.1.20090931cvs.el5.i386.rpm GeoIP-devel-1.4.7-0.1.20090931cvs.el5.i386.rpm  4.安装rrdtool
  # tar xvf rrdtool-1.4.4.tar.gz
  # cd rrdtool-1.4.4
  # ./configure --prefix=/usr/local
  # make
  # make install
  5.编译安装NTOP
  # tar xvf ntop-4.0.1.tar.gz
  # cd ntop-4.0.1
  # ./autogen.sh --with-tcpwrap    //配置--with-tcpwrap选项用于支持TCP Wrappers访问控制
  # make
  # make install
  设置NTOP数据存放目录,NTOP系统默认以低权限用户nobody身份运行,为了使ntop可以读写
  数据,需要对默认的存放目录/usr/local/var/ntop进行权限调整:
  # chown -R nobody /usr/local/var/ntop
  为NTOP管理员设置密码,NTOP默认的管理员为admin,为安全起见,需要为其设置一个密码。另外,通过web页面修改NTOP设置或者关闭NTOP服务时,必须使用管理员用户名和密码进行验证:
  # ntop -A
  设置TCP Wrapper权限,在编译ntop时我们使用了--with-tcpwrap配置项,因此可以通过TCP Wrapper策略
  6.对ntop的访问进行控制:(此步可以根据实际情况进行修改,也可以省略)
  # vim /etc/hosts.allow
  ntop: 192.168.0.10 //只允许192.168.0.10主机NTOP服务
  # vim /etc/hosts.deny
  ntop: ALL
  7.# ntop -d -i eth0 //以后台守护进程的方式(-d)运行                  NTOP服务,并监测eth0网卡所连接的流量
  如果有多块网卡,可以使用以下命令连接不同的局域网段:
  # ntop -d -i eth0,eth1 -M
  ntop默认监听端口为3000,所以可在浏览器中输入http://192.168.0.10:3000查看ntop监控画面

页: [1]
查看完整版本: Ntop的安装与配置