LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
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 09-21-2016, 09:53 PM   #1
freelinuxtutorials
Member
 
Registered: Oct 2009
Posts: 70

Rep: Reputation: 21
iptables tee packets from a mirrored interface


Objective: to copy/tee packets coming from eth1 and send to a destination IP via the eth0 management port
ServerA = eth1 (connected to a switch1 span port)
eth0 (connected to switch2 as management port)
(IP is 192.168.100.99)
ServerB destination IP = 192.168.100.100

1. I can received mirrored packets (e.g. DHCP,DNS) from eth1
2. Tried to tee using this command
iptables -t mangle -A PREROUTING -j TEE --gateway 192.168.100.100

192.168.100.100 can received those packets coming from 192.168.100.99 (e.g. ping/ssh etc)

Problem is we want to send the mirrored packets of eth1.
tcpdump eth0 we cannot even see the packets.

So is bridging the interfaces is the solution on this?
We tried to bridge it but our switch2 will have BPDU err disable everytime we bring eth0 & eth1 together. Is ebtables needed to filter this?


Appreciate your input on this. Thanks.
 
Old 09-22-2016, 03:14 PM   #2
nini09
Senior Member
 
Registered: Apr 2009
Posts: 1,850

Rep: Reputation: 161Reputation: 161
Should be 'iptables -t mangle -A PREROUTING -i eth1 -j TEE --gateway 192.168.100.100' if you want to mirror eth1.
 
Old 09-24-2016, 11:31 PM   #3
freelinuxtutorials
Member
 
Registered: Oct 2009
Posts: 70

Original Poster
Rep: Reputation: 21
thanks nini09. I figured already using the ebtables & iptables combinations. have a good day to all!
here's how I did it
http://freelinuxtutorials.com/tutori...bles-ebtables/
 
  


Reply

Tags
tee


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
iptables wth tee KatrinAlec Linux - Networking 2 04-30-2014 05:05 PM
[SOLVED] iptables + TEE doesn't work correctly stosba Linux - Networking 6 01-31-2013 11:40 AM
Using promiscuous interface and iptables to receive packets not destined to localhost anaidu Linux - Networking 2 03-23-2010 05:07 PM
Send packets to yourself, out one interface and in another algol68 Linux - Networking 3 12-22-2008 02:02 PM
Forward all packets on interface james.farrow Linux - Networking 3 02-20-2007 09:10 AM

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

All times are GMT -5. The time now is 07:21 AM.

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