english_gent Posted January 23, 2014 Posted January 23, 2014 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 Quote
Foxtrot Posted January 23, 2014 Posted January 23, 2014 (edited) The wiki. Nevermind, Was confusing a command for another one. Edited January 23, 2014 by Foxtrot Quote
english_gent Posted January 23, 2014 Author Posted January 23, 2014 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 Quote
english_gent Posted January 23, 2014 Author Posted January 23, 2014 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 ? Quote
Foxtrot Posted January 23, 2014 Posted January 23, 2014 The date is wrong simply because your pineapples date is... wrong. Set it correctly using NTPd or date -h Quote
english_gent Posted January 23, 2014 Author Posted January 23, 2014 I think the date is set correctly - see the output from date.. root@linksys:~# dateThu Jan 23 15:16:40 PST 2014 I have my TZ set via /etc/config as per the post https://scotthelme.co.uk/wifi-pineapple-setup/ and have the entry that seems to be right for PST as the date command works above. So still stumped sorry... Quote
Sailor Posted January 24, 2014 Posted January 24, 2014 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 Quote
english_gent Posted January 25, 2014 Author Posted January 25, 2014 Thanks mate let me try that - work came in between what I really wanted to do yesterday ! Quote
barry99705 Posted January 26, 2014 Posted January 26, 2014 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. Quote
Sebkinne Posted January 26, 2014 Posted January 26, 2014 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. Quote
markcoker Posted January 31, 2014 Posted January 31, 2014 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. Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.