Tuesday, October 16, 2012

Installing daemonlogger on OpenWRT natively, LIKE A BOSS

It's that easy... and it's going in the next stable release (Attitude Adjustment, now in beta) :-D
  1. Update the package listing from main repository...
  2. root@OpenWrt:~# opkg update
    Downloading http://downloads.openwrt.org/attitude_adjustment/12.09-beta/ar71xx/nand/packages//Packages.gz.
    Inflating http://downloads.openwrt.org/attitude_adjustment/12.09-beta/ar71xx/nand/packages//Packages.gz.
    Updated list of available packages in /var/opkg-lists/barrier_breaker.
    
  3. Install the daemonlogger package...
  4. root@OpenWrt:~# opkg install daemonlogger
    Installing daemonlogger (1.2.1-1) to root...
    Downloading http://downloads.openwrt.org/attitude_adjustment/12.09-beta/ar71xx/nand/packages//daemonlogger_1.2.1-1_ar71xx.ipk.
    Installing libpcap (1.1.1-2) to root...
    Downloading http://downloads.openwrt.org/attitude_adjustment/12.09-beta/ar71xx/nand/packages//libpcap_1.1.1-2_ar71xx.ipk.
    Installing libdnet (1.11-2) to root...
    Downloading http://downloads.openwrt.org/attitude_adjustment/12.09-beta/ar71xx/nand/packages//libdnet_1.11-2_ar71xx.ipk.
    Configuring libdnet.
    Configuring libpcap.
    Configuring daemonlogger.
    
  5. Profit!
  6. root@OpenWrt:~# daemonlogger -v
    [-] Log filename set to "daemonlogger.pcap"
    [-] Pidfile configured to "daemonlogger.pid"
    [-] Pidpath configured to "/var/run"
    [-] Rollover size set to 2147483648 bytes
    [-] Rollover time configured for 0 seconds
    [-] Pruning behavior set to oldest IN DIRECTORY
    
    -*> DaemonLogger <*-
    Version 1.2.1
    By Martin Roesch
    (C) Copyright 2006-2007 Sourcefire Inc., All rights reserved
    

OpenWRT on a MikroTik RouterBOARD 450G

w00t.
vineyard@token:~/openwrt/trunk/bin/ar71xx$ ssh root@192.168.1.1
root@192.168.1.1's password: 

BusyBox v1.19.4 (2012-10-14 20:32:51 EDT) built-in shell (ash)
Enter 'help' for a list of built-in commands.

  _______                     ________        __
 |       |.-----.-----.-----.|  |  |  |.----.|  |_
 |   -   ||  _  |  -__|     ||  |  |  ||   _||   _|
 |_______||   __|_____|__|__||________||__|  |____|
          |__| W I R E L E S S   F R E E D O M
 -----------------------------------------------------
 BARRIER BREAKER (Bleeding Edge, r33773)
 -----------------------------------------------------
  * 1/2 oz Galliano         Pour all ingredients into
  * 4 oz cold Coffee        an irish coffee mug filled
  * 1 1/2 oz Dark Rum       with crushed ice. Stir.
  * 2 tsp. Creme de Cacao
 -----------------------------------------------------

root@OpenWrt:~# uname -a
Linux OpenWrt 3.3.8 #2 Sun Oct 14 21:51:05 EDT 2012 mips GNU/Linux

root@OpenWrt:~# cat /proc/cpuinfo 
system type  : Atheros AR7161 rev 2
machine   : MikroTik RouterBOARD 450G
processor  : 0
cpu model  : MIPS 24Kc V7.4
BogoMIPS  : 452.19
wait instruction : yes
microsecond timers : yes
tlb_entries  : 16
extra interrupt vector : yes
hardware watchpoint : yes, count: 4, address/irw mask: [0x0ffc, 0x0ffc, 0x0ffb, 0x0ffb]
ASEs implemented : mips16
shadow register sets : 1
kscratch registers : 0
core   : 0
VCED exceptions  : not available
VCEI exceptions  : not available