port-mirroring for IDS

Post new topic   Reply to topic    DD-WRT Forum Index -> General Questions
Author Message
droidus
DD-WRT User


Joined: 13 Mar 2014
Posts: 85

PostPosted: Tue Nov 10, 2020 23:29    Post subject: port-mirroring for IDS Reply with quote
I would like to do port mirroring on my WAP. I have a Netgear router running the latest firmware version. I have done some research, and it looks like the only way to accomplish this is through iptables rules. But I am having trouble coming up with the right syntax.
Code:
iptables -A PREROUTING -t mangle -j ROUTE –j DNAT --to-destination 192.168.0.10 –tee

0.10 is the host that is my IDS server. I would like it to ingest wireless and wired data. How can I get this to see all the packets going across my network?
Sponsor
Wildlion
DD-WRT Guru


Joined: 24 May 2016
Posts: 1418

PostPosted: Tue Nov 10, 2020 23:47    Post subject: Reply with quote
This would only hit traffic that is going across the router (ie WAN to LAN and LAN to WAN) it might get WLAN to LAN and LAN to WLAN, but will not get the WLAN to WLAn traffic or LAN to LAN

What problems are you seeing?
droidus
DD-WRT User


Joined: 13 Mar 2014
Posts: 85

PostPosted: Tue Nov 10, 2020 23:49    Post subject: Reply with quote
I would like to see all traffic on my network.
It tells me bad argument for the IP.
egc
DD-WRT Guru


Joined: 18 Mar 2014
Posts: 12917
Location: Netherlands

PostPosted: Thu Nov 12, 2020 17:28    Post subject: Reply with quote
I doubt you can do it on a WAP a WAP is nothing more than a switch with AP.

To do port mirroring:

Install full iptables via Entware

To clone all incoming and outgoing traffic for pc 192.168.1.15 on your router (say, 192.168.1.1). and redirect to a spying pc 192.168.1.100, use:
iptables -t mangle -A POSTROUTING -d 192.168.1.15 -j TEE --gateway 192.168.1.100
iptables -t mangle -A PREROUTING -s 192.168.1.15 -j TEE --gateway 192.168.1.100

_________________
Routers:Netgear R7000, R6400v1, R6400v2, EA6900 (XvortexCFE), E2000, E1200v1, WRT54GS v1.
Install guide R6400v2, R6700v3,XR300:https://forum.dd-wrt.com/phpBB2/viewtopic.php?t=316399
Install guide R7800/XR500: https://forum.dd-wrt.com/phpBB2/viewtopic.php?t=320614
Forum Guide Lines (important read):https://forum.dd-wrt.com/phpBB2/viewtopic.php?t=324087
Display posts from previous:    Page 1 of 1
Post new topic   Reply to topic    DD-WRT Forum Index -> General Questions All times are GMT

Navigation

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum