1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.
Dismiss Notice

Welcome To SNBForums

SNBForums is a community for anyone who wants to learn about or discuss the latest in wireless routers, network storage and the ins and outs of building and maintaining a small network.

If you'd like to post a question, simply register and have at it!

While you're at it, please check out SmallNetBuilder for product reviews and our famous Router Charts, Ranker and plenty more!

(Solved) iptables Entry Not Applied 86U 384.8

Discussion in 'Asuswrt-Merlin' started by GHammer, Oct 27, 2018.

  1. GHammer

    GHammer Senior Member

    Joined:
    Jan 25, 2015
    Messages:
    201
    I am trying to get traffic from one device to be available at a second device so I can sniff for certain packets. The traffic from the first device still needs to continue, not just be forwarded to the second device.

    I believe these are the iptables entries I need to do this. However, entering them directly or using a script does nothing when I list iptables.
    I'm sure I have went wrong somewhere, but where?

    Code:
    /jffs/scripts/firewall-start
    #!/bin/sh
    iptables -t mangle -A PREROUTING  -s 10.10.100.121 -j ROUTE --tee --gw 10.10.100.115
    iptables -t mangle -A POSTROUTING -d 10.10.100.121 -j ROUTE --tee --gw 10.10.100.115
    Results after firewall restart (service restart_firewall):
    Code:
    Oct 27 12:17:22 custom_script: Running /jffs/scripts/firewall-start (args: eth0)
    
    [email protected]:/tmp/home/root# iptables -L | grep 115
    [email protected]:/tmp/home/root#
     
    Last edited: Oct 28, 2018
  2. ColinTaylor

    ColinTaylor Part of the Furniture

    Joined:
    Mar 31, 2014
    Messages:
    8,256
    Location:
    UK
    Try:
    Code:
    iptables -t mangle -L -n | grep 115
     
    GHammer likes this.
  3. GHammer

    GHammer Senior Member

    Joined:
    Jan 25, 2015
    Messages:
    201
    Thank you! Works fine.
    I couldn't imagine why it wasn't listed.
     
  4. Jack Yaz

    Jack Yaz Part of the Furniture

    Joined:
    Apr 20, 2017
    Messages:
    2,094
    without a -t argument, iptables -L will show thhe filter table, your rule was adding to mangle.
     
    GHammer likes this.