Setup without changing route tables

Help
Lera
2010-02-02
2013-02-03
  • Lera
    Lera
    2010-02-02

    Hi,

    Is there anyway to setup a test environment without changing route tables. I have several devices connect to my PC via a switch  and with WANem setting up on the PC. But I can't change the route of those devices, only can assign static IP or use DHCP. Is it possible to make those devices go through WANem?

    Any suggestion?

    Thanks,
    Lera

     
  • M K Nambiar
    M K Nambiar
    2010-02-05

    Hi,

    There could be two ways to go about it (depending on what suits you)

    1. ARP spoofing - some one posted good info regarding this in https://sourceforge.net/projects/wanem/forums/forum/711493/topic/3484490

    2. IP proxy - discussed below

    Assumung your application is client server based….

    IP proxy is a way to mask the real IP address of a server.
    Suppose you have a server with real IP address RA. Select an unused IP address PA. We will use PA as a proxy ip address for your server.

    This means that from your client if you were using RA to access there server, now use PA. PA will be assigned to WANem NIC and the WANem can take care of send your packets to the real server and returning to your client program.

    Here is how to make it happen.
    a. In WANem console type "exit2shell"
    b. run the following commands (replace <RA> and <PA> with your IP address as explained above)
    ifconfig eth0 add <PA>
    iptables -t nat -A PREROUTING -dst <PA> -src ! <RA> -j DNAT -to-destination <RA>
    iptables -t nat -A POSTROUTING -dst <RA> -o eth0 -j SNAT -to-source <PA>
    c. Run your client application using PA instead of RA

    Hope this helps.

    Regards,
    M.K.Nambiar

     
  • Marija Stevic
    Marija Stevic
    2013-01-08

    Thank you for this suggestion!
    Very helpful!

    Regards,
    Marija