How to configure reverse loopback on an ethernet device? In that case, all the traffic received will be sent back to transmitter connected to ethernet port.

  • Do you want to have the traffic actually leave the computer hardware and pass through a tp cable? – flob Jun 26 '13 at 18:54

I wonder if you could accomplish what you want using iptables. Looking through the iptables man page I noticed this option called tee:


  The TEE target will clone a packet and redirect this clone to another
  machine on the  local  network  segment.  In  other words, the nexthop 
  must be the target, or you will have to configure the nexthop to forward
  it further if so desired.

  --gateway ipaddr

         Send  the  cloned  packet  to the host reachable at the given IP 
         address.  Use of (for IPv4 packets) or :: (IPv6) is 

  To forward all incoming traffic on eth0 to an Network Layer logging box:

  -t mangle -A PREROUTING -i eth0 -j TEE --gateway 2001:db8::1

It would seem that a command like this would do what you want:

$ iptables -t mangle -A PREROUTING -i eth0 -j TEE --gateway <ip address>

Also there is this tutorial titled: Howto: Copy/Tee/Clone network traffic using iptables, that covers how to use it in a little further details.

  • Hi Sir, This Options is nice in iptables, but can you tell why is it required ? any example , it would be better for me for understanding .. new things.. thanks in advance.. – Rahul Patil Jun 27 '13 at 4:46
  • @RahulPatil - sure if you're familiar with the command line tool tee this is doing something similar with your network data where it's making a copy and sending it to the ip address you provide in the --gateway argument. – slm Jun 27 '13 at 8:36

Try creating two macvlan devices and bridging them to each other.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.