News: This forum is now permanently frozen.
Pages: [1]
Topic: recompiling mono kernel  (Read 6367 times)
« on: April 06, 2007, 13:03:55 »
Shed *
Posts: 6

Hello.
I'm testing 1.3b2 version of monowall. To say the truth I need a tool to calculate incoming and outgoing traffic. Or just a tool to send this information by netflow v.5 to some other machine.

In order to do this I want to recompile mono kernel and add netgraph_netflow in there. I already have a full FreeBSD 6.2 system installed. I also know how to work with mono image. But I can't understand what file in there I should change or where I should place some file made by myself. Or may be there is a more easy way to calculate traffic?

Need your help. Thanks.
« Reply #1 on: April 09, 2007, 13:53:44 »
Shed *
Posts: 6

OK.
I suppose I know how to recompile the kernel. Now I need the configuration file of original mono kernel for version 1.3b2 - in order not to forget anything necessary. I found such for freebsd 4.11, afaik - for mono v.1.2. But there were no conf. files for freebsd 6.2
« Reply #2 on: April 09, 2007, 15:37:01 »
cmb *****
Posts: 851

I'd love to see netflow exports from m0n0wall.

Kernel configs for 6.x here:
http://svn.m0n0.ch/wsvn/wall/branches/freebsd6/build/kernelconfigs/?rev=0&sc=0
« Reply #3 on: April 09, 2007, 16:57:42 »
Shed *
Posts: 6

Thanks for link. Can you please explain what file I need? I see several versions there.

p.s do you think I'm dreaming???
« Last Edit: April 09, 2007, 16:59:28 by Shed »
« Reply #4 on: April 09, 2007, 23:48:22 »
cmb *****
Posts: 851

I don't think it should be extremely difficult to add netflow export.

Which config file you need depends on which version you want to build. Match the config with the desired target platform.
« Reply #5 on: April 20, 2007, 11:48:18 »
Shed *
Posts: 6

Well, I nearly did it!

With the GREAT help of Christian Avram (thanks to him!!!) I recompiled the kernel, added libraries, created new image and booted it. I also put into the image a script, which creates nodes and hooks for netgraph_netflow - just put an executable sh-file. And when I run it from the exec.php page of m0n0 - it works perfectly. And it sends netflow to my server and it counts the traffic - evereything is just great. BUT - I need somehow to run my script at startup without MY help.
I just need to add somewhere a command - "sh /usr/share/ng.sh"
Please, help  Huh
« Reply #6 on: April 20, 2007, 20:32:37 »
clarknova ***
Posts: 148

How about <shellcmd>sh /usr/share/ng.sh</shellcmd> in the system section of config.xml?
« Reply #7 on: April 21, 2007, 20:55:29 »
cmb *****
Posts: 851

shellcmd will suffice for your testing, but isn't adequate if this will be integrated into m0n0wall releases.

I think Manuel would be willing to implement this, as long as it doesn't break anything, if you could post instructions on how you got it into the kernel, how the configuration works, etc.

« Reply #8 on: April 24, 2007, 10:40:33 »
Shed *
Posts: 6

I'll try to use shellcmd, thanks Smiley
I think that my method is not quite good, cause I needed to sweep out some options in the kernel..
I just added the NETGRAPH_NETFLOW option to the original kernel file. Compiled it on the 6.2 FreeBSD system and changed the file kernel.gz in the m0n0 generic-pc-1.3b2 image. And I also added /fs/sbin/ngctl from my FreeBSD system and changed libraries in /usr/lib and /lib.
« Last Edit: April 24, 2007, 11:13:14 by Shed »
 
Pages: [1]
 
 
Powered by SMF 1.1.20 | SMF © 2013, Simple Machines