To get tcp header alone in log


 
Thread Tools Search this Thread
Special Forums IP Networking To get tcp header alone in log
# 1  
Old 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.
# 2  
Old 03-28-2011
Do any one have any idea..??
Login or Register to Ask a Question

Previous Thread | Next Thread

9 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Find header in a text file and prepend it to all lines until another header is found

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

2. Solaris

Too much TCP retransmitted and TCP duplicate on server Oracle Solaris 10

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

3. Shell Programming and Scripting

Manipulate all rows except header, but header should be output as well

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

4. Shell Programming and Scripting

Add column header and row header

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

5. UNIX for Dummies Questions & Answers

Merge all csv files in one folder considering only 1 header row and ignoring header of all others

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. UNIX for Dummies Questions & Answers

Adding a header to a log file

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

7. Linux

Reading the header of a tar file(posix header)

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

8. Programming

How to Parse TCP header

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

9. Programming

TCP Header for Echo Communication

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
Login or Register to Ask a Question