Results 1 to 5 of 5
I was wondering if anyone knew how to make a network interface into a loopback. I want one network interface to simply repeat everything it recieves back out. Any ideas?...
Enjoy an ad free experience by logging in. Not a member yet? Register.
- 09-16-2006 #1Just Joined!
- Join Date
- Sep 2006
- Posts
- 2
Loopback an Interface
I was wondering if anyone knew how to make a network interface into a loopback. I want one network interface to simply repeat everything it recieves back out. Any ideas?
- 09-17-2006 #2Just Joined!
- Join Date
- Sep 2005
- Location
- New delhi
- Posts
- 22
Can you explain it with more verbosity ?
Originally Posted by tm37
Do you want to echo everything you are recieving at any ethernet interface ? or do you want redirect packets you are recieving at any ethernet device into some kind of loopback ?
I am still confused about your query.
- 09-17-2006 #3Just Joined!
- Join Date
- Sep 2006
- Posts
- 2
I have a NIC in server running gentoo. I want that NIC to repeat everything that it recieves from the cable plugged into it back out that same cable. I am finding this very hard to explain. I am sending packets at high speed to this NIC and I want the exact same packets returned to me.
- 09-18-2006 #4Just Joined!
- Join Date
- Sep 2005
- Location
- New delhi
- Posts
- 22
iptables -t nat -PREROUTING -p ALL -d <thix-box-ip> -j DNAT --to <me(the box you are sending packets from)>
iptables -t nat -POSTROUTING -p ALL -d <me> -j SNAT --to <this-box-ip>
Initially we were getting packets as,
Source = Me & Destination = this-box
& now we have changed them to
Source = this-box & Destination = Me.
But i am still not impressed about why do you want to do that.
- 09-18-2006 #5Just Joined!
- Join Date
- Sep 2005
- Location
- New delhi
- Posts
- 22
You can get a good idea of port forwarding, packet forwarding with iptables & SNAT, DNAT at http://amitsharma.linuxbloggers.com/portforwarding.htm
Amit..


Reply With Quote
