LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
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 03-02-2012, 09:54 AM   #1
bigearsbilly
Senior Member
 
Registered: Mar 2004
Location: england
Distribution: Mint, Armbian, NetBSD, Puppy, Raspbian
Posts: 3,515

Rep: Reputation: 239Reputation: 239Reputation: 239
Can I "tee" traffic on a TCP port?


OK I have a TCP service that gets called from outside.
It's in production 24x7.

I was wondering is there a way, without disturbing the status quo,
of splitting the traffic off to another port or server.
(I want to take a look at improving it)

Sort of like an aliased interface.
Like you can split stdout with tee for files?
 
Old 03-02-2012, 11:58 AM   #2
MensaWater
LQ Guru
 
Registered: May 2005
Location: Atlanta Georgia USA
Distribution: Redhat (RHEL), CentOS, Fedora, CoreOS, Debian, FreeBSD, HP-UX, Solaris, SCO
Posts: 7,831
Blog Entries: 15

Rep: Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669
tcpdump/wireshark doesn't do what you need to see the traffic?
 
Old 03-05-2012, 02:21 AM   #3
bigearsbilly
Senior Member
 
Registered: Mar 2004
Location: england
Distribution: Mint, Armbian, NetBSD, Puppy, Raspbian
Posts: 3,515

Original Poster
Rep: Reputation: 239Reputation: 239Reputation: 239
I could probably just write a tcpdump filter.
Might as well learn it properly I guess.

I was just wondering if there was an easy way.
 
Old 03-05-2012, 03:16 AM   #4
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
Not sure I can imagine an easier way... what would be a better scenario to you?

There IS a TEE output for iptables though, it does exist. But what are you going to do with it?

Last edited by acid_kewpie; 03-05-2012 at 03:18 AM.
 
Old 03-05-2012, 03:24 AM   #5
bigearsbilly
Senior Member
 
Registered: Mar 2004
Location: england
Distribution: Mint, Armbian, NetBSD, Puppy, Raspbian
Posts: 3,515

Original Poster
Rep: Reputation: 239Reputation: 239Reputation: 239
I have a data feed, a legacy system which receives data via xinetd.
It's legacy, live and very important.

I want to dissect and eventually control and replace it without stopping the flow
see what I mean?

I could call the provider get a backup feed blah blah but I hate paperwork.
 
Old 03-05-2012, 03:25 AM   #6
zhjim
Senior Member
 
Registered: Oct 2004
Distribution: Debian Squeeze x86_64
Posts: 1,748
Blog Entries: 11

Rep: Reputation: 233Reputation: 233Reputation: 233
DEpending on your iptables version you can use the tee option.

http://dev.medozas.de/files/xtables/iptables.html

Search for "tee " to find the appropiate section.
 
Old 03-05-2012, 03:31 AM   #7
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
Quote:
Originally Posted by bigearsbilly View Post
I have a data feed, a legacy system which receives data via xinetd.
It's legacy, live and very important.

I want to dissect and eventually control and replace it without stopping the flow
see what I mean?

I could call the provider get a backup feed blah blah but I hate paperwork.
well teeing the traffic is only good for watching it, and possibly cutting connections etc. You can't make a difference service interact with it, as the other end is having a proper TCP conversation with a different bit of software. If you need to replace it, then you'd be looking at possibly putting in a temporary dnat or something, not to try to directly interfere with the traffic.
 
  


Reply



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
[SOLVED] Capturing PID's when the "tee" command is involved. wahoodoss Linux - Newbie 4 12-27-2011 10:04 AM
echo "hahaha" | sudo tee /root/reallyimportantstuff crispyleif Linux - Security 7 01-24-2009 11:51 AM
unwanted network traffic on tcp port 135 debasish_5849 Linux - Security 4 04-20-2006 10:33 PM
adsl+iptables+port forward+"-m tcp" strange problem icry0000 Linux - Networking 3 07-31-2005 09:31 PM
"Opposite" to a "Listening" in Port Lingo General_Tso Linux - Security 6 02-11-2004 11:19 AM

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

All times are GMT -5. The time now is 06:26 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