Find the answer to your Linux question:
Results 1 to 2 of 2
I am new to iptables. I have a 2 virtual machines. VM1 - I1,I2 (2 interfaces,192.168.122.2,10.0.0.2) VM2 - I1,I2 (2 interfaces,192.168.122.3,10.0.0.3) What I need to implement is,to redirect traffic that ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    May 2012
    Posts
    27

    Exclamation How to redirect packets using iptables


    I am new to iptables. I have a 2 virtual machines.

    VM1 - I1,I2 (2 interfaces,192.168.122.2,10.0.0.2)

    VM2 - I1,I2 (2 interfaces,192.168.122.3,10.0.0.3)

    What I need to implement is,to redirect traffic that is received on I1 of VM1 to I1 of VM2. VM2 on receiving,should process those packets,then send out through its I2 to I2 of VM1. VM1 should then reply to the original request.

    Example : Say there is a ping request to VM1 at IP 192.168.122.2.

    The flow should be as follows:

    Recieve packet at I1,VM1.

    Redirect those packets to I1,VM2.

    VM2 should process those packets and then send the output through its I2 to I2 of VM1.

    VM1 should then send the reply back to the original packet.

    How do I achieve this?Can anyone please help me out here?

    Thanks in advance.

  2. #2
    Trusted Penguin
    Join Date
    May 2011
    Posts
    4,353
    Moving your thread to the Networking forum will maybe get you some help...

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •