LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 07-18-2013, 10:02 AM   #1
Imprive
Member
 
Registered: Oct 2010
Posts: 33

Rep: Reputation: 0
Running TCPDump continuously


Hello,
I recently sinkholed a domain, and I setup a server on EC2 that contains HoneyD and TCPdump to record all interactions with the botnet. The only problem is, I am having a slight problem with TCPdump. I can't get it to run continuously. I put entries into crontab, and I run it from the terminal, but every time I log out of ssh it stops, and won't start again.

Here is the current command I use:

sudo tcpdump -n -i eth0 -s0 -C 1000 -w /home/ubuntu/output4

Basically its supposed to
1. rotate log files
2. run TCPdump all the time


Can someone help me figure out how to run this continually with rotating log files?

The only other thread I found was this one: http://www.linuxquestions.org/questi...ground-843026/

but it does not adequately explain the solution.

Thanks,
Imprive
 
Old 07-18-2013, 11:17 AM   #2
Sydney
Member
 
Registered: Mar 2012
Distribution: Scientific Linux
Posts: 147

Rep: Reputation: 36
Have you tried nohup?
 
Old 07-18-2013, 02:50 PM   #3
zhjim
Senior Member
 
Registered: Oct 2004
Distribution: Debian Squeeze x86_64
Posts: 1,748
Blog Entries: 11

Rep: Reputation: 233Reputation: 233Reputation: 233
nohup is the way to go as normaly linux kills processes when you log out of the terminal. Nother thing to considere here is the screen command which takes control of the tty and holds it open, so process still can go on.

the actual tcpdump command is another thing. first get it to reside after logout.

P.S. There is also an alternative to screen but i'm to lazy to search for it right now.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
running a tcpdump in the background neil_payne Linux - Software 2 11-16-2010 04:35 AM
[SOLVED] Ubuntu 9.10 Suddenly Disk Drive is Running Continuously - NonStop Redwoodguy Linux - Newbie 3 05-07-2010 08:22 AM
[SOLVED] Script for continuously checking if program running, need help tine Programming 4 11-04-2009 02:53 AM
Running a C programme in LINUX background continuously bhuvana Linux - General 9 07-06-2006 09:04 AM
Continuously running process...how do I stop it? Holly Linux - Newbie 2 02-27-2004 01:39 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 02:23 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration