Sponsored Content
Full Discussion: ICMP for limited time
Top Forums Shell Programming and Scripting ICMP for limited time Post 302896630 by Satyajeet@uh on Tuesday 8th of April 2014 11:34:06 AM
Old 04-08-2014
ICMP for limited time

Hi,

I am using following command:
Code:
tcpdump -i eth1 icmp[0] =8 >output.txt

i want this command to get execute for a minute only. How can we do this?

Thanks.


Moderator's Comments:
Mod Comment Please use code tags next time for your code and data. Thanks
 

8 More Discussions You Might Find Interesting

1. IP Networking

icmp

how i can send the big icmp packets to the another ip for loose connection ....or how he can loose (1 Reply)
Discussion started by: seccom
1 Replies

2. Linux

Linux and ICMP timestamp requests.

Hi There, I am looking to disable ICMP timestamp requests and ICMP timestamp replies on my Linux server version 8. Can someone please tell me the simplest way to do this? I know a command to disable all ICMP traffic but this I have been told will cause many network problems which I... (2 Replies)
Discussion started by: gerwhelan
2 Replies

3. UNIX for Advanced & Expert Users

ICMP Echo-Request

Hello! I'm in extra urgent need to have a program that sends a series of ICMP echo requests over the network to a specified host and waits until the last echo reply is received. I know little about socket-programming (in particular I've never dealt with icmp sockets) that's why i'm desperate!! :)... (5 Replies)
Discussion started by: ilmora
5 Replies

4. UNIX for Advanced & Expert Users

Implementing "Time Limited, Trial" version of my program

Hello everyone, I am just looking for ideas on how I can implement a demo version of my program which will be available in unix environment (solaris and linux). So what I have in mind is to either implement a limited-time version (trial version expires after 30 days) or a limited-number... (4 Replies)
Discussion started by: the_learner
4 Replies

5. IP Networking

Ping ICMP

Hi All, How to disable ICMP time stamp request and time stamp reply of a machine? How to test this feature from remote machine? Please reply back Vasanth (2 Replies)
Discussion started by: vasanthan
2 Replies

6. UNIX for Dummies Questions & Answers

Log file for icmp requests

I'm not a unix expert so I need to ask what maybe a simple question to some. Is there a log file which records any icmp packets hitting the server? I ask, because I need to verify what the ip is from a server pinging mine. (3 Replies)
Discussion started by: numele
3 Replies

7. Shell Programming and Scripting

waiting on jobs in bash, allowing limited parallel jobs at one time, and then for all to finish

Hello, I am running GNU bash, version 3.2.39(1)-release (x86_64-pc-linux-gnu). I have a specific question pertaining to waiting on jobs run in sub-shells, based on the max number of parallel processes I want to allow, and then wait... (1 Reply)
Discussion started by: srao
1 Replies

8. IP Networking

Routing ICMP echo requests

I have an application where I need to configure a router to pass through ping requests (ICMP type http://www.dd-wrt.com/phpBB2/images/smiles/icon_cool.gif through to the LAN port. I have a Linksys WRT54GS with tiny DD-WRT V24 SP2 installed. I am adding the following iptables rules: iptables -t... (0 Replies)
Discussion started by: dschlic1
0 Replies
nstreams(1)							   Users Manuals						       nstreams(1)

NAME
network streams - a tcpdump output analyzer SYNOPSIS
nstreams [ -v ] [ -c nstreams-services ] [ -n nstreams-networks_file ] [ -N [ -i ] [ -I ]] [ -r ] [ -O output [ -D iface ] [ -Y ]] [ -u ] [ -U ] [ -B ] [ -f tcpdump_file ] [ -l <iface> ] [ tcpdump output ] DESCRIPTION
nstreams is a utility designed to identify the IP streams that are occuring on a network from a non-user friendly tcpdump output of several megabytes. This is especially useful when you plan to install a firewall but if you do not know the nstreams that the network users are generating (http, real audio, and more...). nstreams can read the tcpdump output directly from stdin, or from a file. It can even generate the con- figuration file of your firewall, using the -O option. OPTIONS
-c <nstreams-services-file> The path to an alternate nstreams service file. This file is used to identify each protocol. See the services file section later in this manual page. -n <nstreams-networks-file> The path to an alternate nstreams network file. This file is used to identify which hosts belong to which network. See the networks file section later in this manual page. -f <tcpdump output file> The path to the file to read data from. This file must have been generated using 'tcpdump -w filename'. -l <iface> Listen directly on interface <iface>. This avoids the use of tcpdump. -N print the networks names instead of the hosts IP addresses. The intra-network traffic will not be shown. Use this option twice to show the networks IP address instead of their names. -i Also show the intra-network traffic (must be used with -N) -I Only show the intra-network traffic (must be used with -N) -r be redundant. That is, the same streams will be printed each time they appear in the dump. -v print version number and exit. -O <type> output type. You can use this option to generate your firewall startup script. Do nstreams -h to see the supported output types. -D <iface> interface to apply to output onto. Must be used with -O. -Y The firewall rules that will be generated will deny all packets coming from the outside trying to establish connections to the inside. If you system is not serving anything, then it's safe to turn on this option. -u Do not print the unknown streams -U Only print the unknown streams -B Show broadcasts and networks USAGE
Let tcpdump(1) run some time on your network (like one week), and save its output in a file, by doing : tcpdump -l -n > output or tcpdump -w filename Then, feed nstreams with this output file, and it will turn it into a easily-readable file which will help you to write efficient firewall filters. You may also do : tcpdump -l -n | nstreams or nstreams -f filename (if you used tcpdump -w) THE SERVICES FILE
The service file contains the description of each protocol, as well as their name. Its syntax is : protocol_name:server_port(s)/{udp,tcp}:client_ports(s) or : protocol_name:type(s)/icmp:code(s) Whereas : protocol_name is the name of the protocol described. This name may contain any character, including space, except ':'. server_port(s) is the range of ports used by the server. Usually, you will want to define one server port only, but you may enter any range you want. ip_protocol is the IP protocol that this protocol is lying onto. Acceptable values are tcp and udp client_port(s) is the range of ports that the client may use. You can set this to any or, for more accurate results, to ports ranges, like '1-1024,2048-4096'. The rules are : 'first match, first taken'. SERVICE FILE EXAMPLE
Using this syntax, you would declare the ssh protocol by : ssh-unix:22/tcp:1000-1023 Because the Unix version of the ssh client uses a privileged port to connect onto the ssh server which listens on port 22. THE NETWORKS FILE
The networks file is used to define sets and subsets of hosts (also known as networks). This avoids redundancy in the output file. The syn- tax format for this file is : network name:ip/mask Whereas the network name is whatever you want, the IP is the ip of the network, and the mask is the CIDR netmask of the network. The rule is 'first match, first taken'. NETWORKS FILE EXAMPLE
admin:192.168.19.0/29 whole_subnet:192.168.0.0/16 internet:0.0.0.0/0 LIMITS
o nstreams can only parse the output of 'tcpdump -n' o Even though the output of nstreams is easier to read than the one of tcpdump, it is still not easily readable. Use sort(1) on the nstream output to get a more readable file. o This program could have been written in perl FILES
/etc/nstreams-services /etc/nstreams-networks SEE ALSO
tcpdump(1) AUTHORS
Concept : Herve Schauer Consultants - http://www.hsc.fr Coding : Renaud Deraison <deraison@cvs.nessus.org> BUG REPORTS
Please send all your bug reports with the detail of your configuration to Renaud Deraison <deraison@cvs.nessus.org> nstreams July 1999 nstreams(1)
All times are GMT -4. The time now is 08:32 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy