# How to set and run net-flow



## DEViATIO (Mar 30, 2009)

hi,i want to measure traffic on my computer and get a  graph (like in www)
step 1: which ports would i install?


thx DEVi


----------



## DutchDaemon (Mar 30, 2009)

/usr/ports/net/ntop is fairly easy, and very detailed. More graphs than you can shake a stick at, and it doesn't need a webserver (it'll run its own on port 3000).


----------



## tangram (Mar 30, 2009)

Darstat captures network traffic, calculates statistics about usage, and serves reports over HTTP.

I wrote and HOWTO at http://linux-bsd-sharing.blogspot.com/2008/10/howto-network-traffic-bandwidth.html.

vnStat is a console-based network traffic monitor. It keeps a log of hourly, daily and monthly network traffic for the selected interface(s); however it doesn't report via HTTP. You'll find an HOWTO at http://linux-bsd-sharing.blogspot.com/2008/09/howto-monitor-network-traffic-with.html


----------



## DEViATIO (Mar 30, 2009)

first was ntop,some errors in cairo:

```
checking whether cairo's image surface backend feature could be enabled... no (requires pixman-1 >= 0.12.0 [url]http://cairographics.org/releases/[/url])
configure: error: mandatory image surface backend feature could not be enabled
===>  Script "configure" failed unexpectedly.
Please run the gnomelogalyzer, available from
"http://www.freebsd.org/gnome/gnomelogalyzer.sh", which will diagnose the
problem and suggest a solution. If - and only if - the gnomelogalyzer cannot
solve the problem, report the build failure to the FreeBSD GNOME team at
[email]gnome@FreeBSD.org[/email], and attach (a)
"/usr/ports/graphics/cairo/work/cairo-1.8.6/config.log", (b) the output of
the failed make command, and (c) the gnomelogalyzer output. Also, it might
be a good idea to provide an overview of all packages installed on your system
(i.e. an `ls /var/db/pkg`). Put your attachment up on any website,
copy-and-paste into [url]http://freebsd-gnome.pastebin.com[/url], or use send-pr(1) with
the attachment. Try to avoid sending any attachments to the mailing list
(gnome@FreeBSD.org), because attachments sent to FreeBSD mailing lists are
usually discarded by the mailing list software.
*** Error code 1

Stop in /usr/ports/graphics/cairo.
*** Error code 1

Stop in /usr/ports/graphics/cairo.
*** Error code 1

Stop in /usr/ports/databases/rrdtool.
*** Error code 1

Stop in /usr/ports/databases/rrdtool.
*** Error code 1

Stop in /usr/ports/net/ntop.
*** Error code 1
```

sry,i didnt try gnomelogalyzer for errors(to hard steps for me)


second i follow this link from tangram:
http://linux-bsd-sharing.blogspot.co...bandwidth.html
darkstat is ok.
be careful about your ethernet interface settings in rc.conf darkstat_interface="rl0"    my was "re0" your will be different...

graphs are accesible from http://ipadress:667

but anybody cat see it !

it is some tool to hide it[something stronger than "nobody know your ip",like passwd protected?]

THX both for help


----------



## DutchDaemon (Mar 31, 2009)

Is your ports tree up to date? Ntop should really compile without problems and pull in its dependencies without errors. 

As far as shielding the output is concerned: you will have to do your own firewalling, or run these programs on localhost, using portforwarding over ssh to point your browser to them. I'm not sure about Darkstat, but Ntop will happily serve data about an external interface on 127.0.0.1.


----------



## tangram (Mar 31, 2009)

DEViATIO said:
			
		

> be careful about your ethernet interface settings in rc.conf darkstat_interface="rl0"    my was "re0" your will be different...



Blind copy paste does that... the post's next line already warned about that _"Change the darkstat_interface to reflect your network interface (mine is rl0)."_

Like DutchDaemon said, you can block access to that port through your firewall.

As for password protecting access you can always request that feature to darkstat's author at http://dmr.ath.cx/net/darkstat/


----------

