Jump to content

Recommended Posts

Posted

Maybe this is a moot point but I have gleaned how to start Karma in the /etc/rc.local file every time the box boots, but does anyone know the entire command I would need to run to get tcpdump to work on br-lan ?

(this is what starts Karma for me)

# Start Karma

# hostapd_cli -p /var/run/hostapd-phy0 karma_enable >/dev/null 2>&1 &

# sleep 2

Thanks in advance

Posted

Ok having searched through the Wiki (before and after it was suggested to me) I am still having trouble getting tcpdump to start automatically either using the DIP switches or via say the rc.local file. The command that seems to be executed in the tcpdump tile is 'tcpdump -i br-lan' and because tcpdump is installed on my SD card thats where the logs get written.

Could someone please take the time and help me with the syntax to get it started either via say rc.local or the DIP switches and write to a dump file on the SD card ?

Cheers

Posted

Hey thanks for that, I finally used the format

tcpdump -i br-lan > /sd/infusions/tcpdump/includes/dumps/tcpdump_`date +%s`.pcap &

and it writes files but the date is all wrong. I had taken this as suggested syntax from the WIKI at the following link but all I get is a file similar to the following: tcpdump_69.pcap or tcpdump_70.pcap and the date on the file (as shown in the TCPDUMP HISTORY tile) is 1970 : 01-01-01 http://wiki.wifipineapple.com/index.php/DIP_Switches

What am I doing wrong with the date command please ?

Posted

Try this one:

DATE=$(date +"%Y%m%d%H%M")
tcpdump -n -C 128 -W 100 -i br-lan -w /sd/log/packetlog-$DATE.pcap >/dev/null 2>&1 &

You can remove the -C and -W switches if you want just one big file

Posted

Okay, just so you know, the pineapple doesn't have a real time clock. It gets time from the internet, so if you're running without an internet connection, time will be wrong.

Posted

Okay, just so you know, the pineapple doesn't have a real time clock. It gets time from the internet, so if you're running without an internet connection, time will be wrong.

This is correct. Even when running with NTP, it is possible that you get the time after this command executes. I'd add a delay to the command - maybe 20 seconds, just to be safe. Now your log should be named correctly.

Posted

TIP: if your wanting to test your dip setup you could run /usr/bin/dip-handler which ive found handy to test correct dip setup.

1. So you first just use web interface Configuration > Boot Modes (or edit mk5.db with a db editor of your choice) to edit dip settings & save.

2. Change your dips correct to the settings you want to test.

3. Finally run /usr/bin/dip-handler and those settings will run.

Hope it helps.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...