03-24-2011
To get tcp header alone in log
To get tcp header alone in log
----------------------------------------------------------------------------------------[
]# vi /etc/sysconfig/iptables
---added the following 2 lines..
-A INPUT -j LOG --log-ip-options
-A INPUT -j LOG --log-tcp-options
]# vi /etc/syslog.conf
---added the following 1 line
kern.warning /var/log/iptables.log # for getting IPTables' log in iptables.log file
]# /etc/init.d/syslog restart
]# service iptables restart
]# tail -f /var/log/iptables.log
# du -sh /var/log/iptables.log
Here is the problem...
As i did it in a server , the file size is keep on increasing like anything..
----------------------------------------it's working fine.------------------------------------------------]
But I just need TCP header alone . Not all the protocols...
Is there any way..??
Here i used iptables... to get Log..
You can suggest me any other way..
Anything acceptable. My actual need is to know who are all connecting my server using TCP..
.
.
Last edited by linuxadmin; 03-24-2011 at 08:54 AM..
Reason: changing the view.
9 More Discussions You Might Find Interesting
1. Programming
I am attempting to construct a TCP header for a simple echo server program using header fields: type, reserve1, reserve2, data length, sequence number, and data. Type will be a char variable whereas chracter 8 will represent an echo request message and 0 will represent an echo reply message. The... (0 Replies)
Discussion started by: AusTex
0 Replies
2. Programming
I am using socket programming and want to parse TCp header.
What are the required header files and the reqiured functions
Plz help me out...
Vipin (2 Replies)
Discussion started by: cool_vip
2 Replies
3. Linux
say i have these many file in a directory named exam.
1)/exam/newfolder/link.txt.
2)/exam/newfolder1/
and i create a tar say exam.tar
well the problem is,
when i read the tar file i dont find any metadata about the directories,as you cannot create a tar containig empty directories.
on the... (2 Replies)
Discussion started by: Tanvirk
2 Replies
4. UNIX for Dummies Questions & Answers
Hello,
I’m trying to add a row that will server as the header for a space separated file.
1-I have a number of files save in a directory
2- grep text path/*.log > newfile
newfile looks like this
Field1 Field2 Field3 Field4
Field1 Field2 Field3 Field4
Field1 Field2 Field3 Field4
Field1... (2 Replies)
Discussion started by: rene reivera jr
2 Replies
5. UNIX for Dummies Questions & Answers
Friends,
I need help with the following in UNIX.
Merge all csv files in one folder considering only 1 header row and ignoring header of all other files.
FYI - All files are in same format and contains same headers.
Thank you (4 Replies)
Discussion started by: Shiny_Roy
4 Replies
6. Shell Programming and Scripting
Hi,
I have an input like this
1 2 3 4
2 3 4 5
4 5 6 7
I would like to count the no. of columns and print a header with a prefix "Col".
I would also like to count the no. of rows and print as first column with each line number with a prefix "Row"
So, my output would be
... (2 Replies)
Discussion started by: jacobs.smith
2 Replies
7. Shell Programming and Scripting
Hello There...
I have a sample input file ..
number:department:amount
125:Market:125.23
126:Hardware store:434.95
127:Video store:7.45
128:Book store:14.32
129:Gasolline:16.10
I will be doing some manipulations on all the records except the header, but the header should always be... (2 Replies)
Discussion started by: juzz4fun
2 Replies
8. Solaris
I have problem with oracle solaris 10 running on oracle sparc T4-2 server.
Os information: 5.10 Generic_150400-03 sun4v sparc sun4v
Output from tcpstat.d script
TCP bytes: out outRetrans in inDup inUnorder
6833763 7300 98884 0... (2 Replies)
Discussion started by: insatiable1610
2 Replies
9. Shell Programming and Scripting
I've been struggling with this one for quite a while and cannot seem to find a solution for this find/replace scenario. Perhaps I'm getting rusty.
I have a file that contains a number of metrics (exactly 3 fields per line) from a few appliances that are collected in parallel. To identify the... (3 Replies)
Discussion started by: verdepollo
3 Replies
tcp.h(3HEAD) Headers tcp.h(3HEAD)
NAME
tcp.h, tcp - definitions for the Internet Transmission Control Protocol (TCP)
SYNOPSIS
#include <netinet/tcp.h>
DESCRIPTION
The <netinet/tcp.h> header defines the following macro for use as a socket option at the IPPROTO_TCP level:
TCP_NODELAY Avoid coalescing of small segments.
The macro is defined in the header. The implementation need not allow the value of the option to be set with setsockopt() or retrieved with
getsockopt().
ATTRIBUTES
See attributes(5) for descriptions of the following attributes:
+-----------------------------+-----------------------------+
| ATTRIBUTE TYPE | ATTRIBUTE VALUE |
+-----------------------------+-----------------------------+
|Interface Stability |Standard |
+-----------------------------+-----------------------------+
SEE ALSO
getsockopt(3XNET), socket.h(3HEAD), attributes(5), standards(5)
SunOS 5.10 10 Sep 2004 tcp.h(3HEAD)