免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 5110 | 回复: 5
打印 上一主题 下一主题

代理服务器上,ntop里记录的内网IP地址都变成出外网的IP了,怎么办? [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2009-03-16 11:14 |只看该作者 |倒序浏览
10可用积分
用Fedora9做网关,装了squid做代理服务器,内网口eth1的IP为192.168.1.1,外网口eth0的IP为192.168.0.254,
用ntop做流量统计时出现一个问题,内网机器192.168.1.***流量都被计算在192.168.0.254上,
请问该怎么样设置才能解决这个问题?非常感谢!!
我的ntop的配置ntop.conf如下:
[root@Test1 ~]# cat /etc/ntop.conf
# tells ntop the user id to run as
--user ntop

#save messages into the system log
--use-syslog=daemon

# sets the directory that ntop runs from
--db-file-path /var/lib/ntop

# the amount and severity of messages that ntop will put out
--trace-level 3

# limit ntop to listening on a specific interface and port
--http-server 127.0.0.1:3000 --https-server 127.0.0.1:3001

# Under certain circumstances, the sched_yield() function causes the ntop web
# server to lock up.  It shouldn't happen, but it does.  This option causes
# ntop to skip those calls, at a tiny performance penalty.
--disable-schedyield

# disables "phone home" behavior
--skip-version-check=yes
--interface eth0,eth1

[ 本帖最后由 setsuna 于 2009-3-16 11:30 编辑 ]

论坛徽章:
5
IT运维版块每日发帖之星
日期:2015-08-06 06:20:00IT运维版块每日发帖之星
日期:2015-08-10 06:20:00IT运维版块每日发帖之星
日期:2015-08-23 06:20:00IT运维版块每日发帖之星
日期:2015-08-24 06:20:00IT运维版块每日发帖之星
日期:2015-11-12 06:20:00
2 [报告]
发表于 2009-03-16 11:18 |只看该作者
192.168.0.***

打错了吧。你NTOP部署在什么位置,是在网关上,还是另外的一台机器上。

论坛徽章:
0
3 [报告]
发表于 2009-03-16 11:24 |只看该作者
原帖由 ssffzz1 于 2009-3-16 11:18 发表
192.168.0.***

打错了吧。你NTOP部署在什么位置,是在网关上,还是另外的一台机器上。




打错了,是192.168.1.***。是在网关上,同时装了squid和ntop

论坛徽章:
5
IT运维版块每日发帖之星
日期:2015-08-06 06:20:00IT运维版块每日发帖之星
日期:2015-08-10 06:20:00IT运维版块每日发帖之星
日期:2015-08-23 06:20:00IT运维版块每日发帖之星
日期:2015-08-24 06:20:00IT运维版块每日发帖之星
日期:2015-11-12 06:20:00
4 [报告]
发表于 2009-03-16 11:29 |只看该作者
--interface eth0,eth1
改成:
--interface eth1

试试,这个的配置文件我不太熟悉,希望不要有语法错误。

论坛徽章:
0
5 [报告]
发表于 2009-03-16 11:37 |只看该作者
原帖由 ssffzz1 于 2009-3-16 11:29 发表
--interface eth0,eth1
改成:
--interface eth1

试试,这个的配置文件我不太熟悉,希望不要有语法错误。



这样好像也不行,我用ntop -i eth1启动,可以解决这个问题

论坛徽章:
5
IT运维版块每日发帖之星
日期:2015-08-06 06:20:00IT运维版块每日发帖之星
日期:2015-08-10 06:20:00IT运维版块每日发帖之星
日期:2015-08-23 06:20:00IT运维版块每日发帖之星
日期:2015-08-24 06:20:00IT运维版块每日发帖之星
日期:2015-11-12 06:20:00
6 [报告]
发表于 2009-03-16 11:47 |只看该作者
那就OK了。
就是监听接口的问题。
不过我也搞不清楚改配置文件为啥无效。你man一下配置文件格式,还有可以Debug一下,确认是否读取配置文件以及是否生效。
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP