LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 07-30-2018, 08:36 PM   #1
Squidbillies
LQ Newbie
 
Registered: Jul 2018
Posts: 2

Rep: Reputation: Disabled
iptables Command


I'm trying to duplicate packets from that are going to one IP on my network and send them to another IP. I have an ASUS router and I can terminal into it using Putty. I run the following commands and I receive error "iptables: No chain/target/match by that name." I've double-checked the IP addresses and they are correct. From what I've been able to gather, this should duplicate all packets from 192.168.128.40 and send them to 192.168.128.143.
Code:
iptables -t mangle -A PREROUTING -d 192.168.128.40 -j TEE --gateway 192.168.128.143
iptables -t mangle -A PREROUTING -s 192.168.128.40 -j TEE --gateway 192.168.128.143
 
Old 07-30-2018, 10:00 PM   #2
berndbausch
LQ Addict
 
Registered: Nov 2013
Location: Tokyo
Distribution: Mostly Ubuntu and Centos
Posts: 6,316

Rep: Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002
The error indicates that you don't have the TEE extension.

On my Fedora 28:
Code:
$ modinfo xt_TEE
filename:       /lib/modules/3.10.107-190/kernel/net/netfilter/xt_TEE.ko
alias:          ip6t_TEE
...
I guess that's missing on your box.

Last edited by berndbausch; 07-30-2018 at 10:01 PM. Reason: incorrect formatting; removed irrelevant text.
 
Old 07-31-2018, 06:09 AM   #3
Squidbillies
LQ Newbie
 
Registered: Jul 2018
Posts: 2

Original Poster
Rep: Reputation: Disabled
It appears that the commands below work for some reason. I don't understand Linux or this command enough to know why. I just dug around the internet and finally was able to put these together.

Code:
iptables -t mangle -I PREROUTING -s 192.168.128.40 -j ROUTE --gw 192.168.128.143 --tee
iptables -t mangle -I POSTROUTING -d 192.168.128.40 -j ROUTE --gw 192.168.128.143 --tee
 
  


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
Need help translating iptables command to firewall-cmd --direct command taylorkh Linux - Networking 4 03-27-2018 08:50 AM
An error occured getting IPtables status from the command /etc/rc.d/init.d/iptables s CrazyMAzeY Linux - Newbie 10 08-12-2010 05:25 AM
iptables command/iptables GUI? basketkase999 Linux - Security 5 04-12-2005 02:43 PM
Iptables command ThePlague Linux - Networking 6 02-16-2004 04:51 PM
need iptables command for... di11rod Linux - Security 5 01-28-2004 04:34 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

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