LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
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 07-21-2013, 07:41 AM   #1
gdizzle
Member
 
Registered: Jul 2012
Posts: 234

Rep: Reputation: Disabled
IPtables PortMirroring Centos 6.4


Hi All,
I wish to setup Port-Mirroring on a Centos 6.4 router using iptables was was going to use the commands:

Code:
iptables -I PREROUTING 1 -t mangle -j ROUTE --gw 192.168.122.62 --tee
iptables -I POSTROUTING 1 -t mangle -j ROUTE --gw 192.168.122.62 --tee
Until I found out the module wasn't included in the Iptables:

Code:
iptables v1.4.7: unknown option `--gw'
To include this module would I have recompile netfilter aka download and install and build a new Kernel?

Is it possible to use iproute2 tools to SPAN/Port-Mirror?

Thanks
 
Old 07-22-2013, 02:24 AM   #2
zhjim
Senior Member
 
Registered: Oct 2004
Distribution: Debian Squeeze x86_64
Posts: 1,748
Blog Entries: 11

Rep: Reputation: 233Reputation: 233Reputation: 233
Don't know if recompile is in need but sure a read of the man page. spell out --gw and you should be set. As for the manpage its --gateway. Also not sure if your jumps are correct. TEE is a target option for -j
 
Old 07-22-2013, 05:58 PM   #3
gdizzle
Member
 
Registered: Jul 2012
Posts: 234

Original Poster
Rep: Reputation: Disabled
Here is my refrence: http://blog.goddchen.de/2009/03/port...with-iptables/

Looks like ROUTE is not avaliable, looks like it's missing the modules ....

Code:
iptables -I PREROUTING 1 -t mangle -j ROUTE
iptables v1.4.7: Couldn't load target `ROUTE':/lib64/xtables-1.4.7/libipt_ROUTE.so: cannot open shared object file: No such file or directory
 
Old 07-23-2013, 01:43 AM   #4
zhjim
Senior Member
 
Registered: Oct 2004
Distribution: Debian Squeeze x86_64
Posts: 1,748
Blog Entries: 11

Rep: Reputation: 233Reputation: 233Reputation: 233
checking the man pages of various version of iptables I did not found a module called ROUTE once . And as in the comments most people are having trouble with these two lines I doubt they are correct anymore. Check the man pages and search for the TEE target. Something like

Code:
iptables -t mangle -I PREROUTING -j TEE --gatewya 192.162.122.62
should do the trick. iptables version 1.4.14.
 
  


Reply


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 on centOS Niso Linux - Distributions 1 03-28-2013 03:17 AM
Squid and IPTABLES in CentOS 6.2 skc Linux - Server 1 05-24-2012 09:40 AM
CentOS 5.5 - iptables keeps clearing markbad311 Linux - Security 15 01-13-2012 10:36 AM
[SOLVED] CentOS 5.5 - iptables keeps clearing markbad311 Linux - Newbie 1 01-05-2012 06:48 PM
CentOS Iptables joncruz Linux - Newbie 1 09-29-2009 07:39 PM

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

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