From: John Yuan Date: 2010-03-31T13:58:20+09:00 Subject: Re: Bind NICs to Mechanize Walton Hoops wrote: > It doesn't work that way. Mechanize is a client, not a server. The NIC > used is decided by the destination IP and the routes in your Operating > System. Only server sockets can be bound to one or more IPs. Thank you Walton, I am afraid that your comment would be the most the answer after spending quite sometime searching for solution. You helped me to put the period to my approach. It may not be Ruby specific problem, but let me explain the situation. My client has 3 accounts on B2B site and all 3 accounts need to accessed with specific IP address (3 different offices, 3 different IPs). I was asked to write script to show consolidated inventory list over those 3 accounts. So I sat up a Debian with 3 NICs, VPN/LAN/PPP to 3 different offices network and “proxying” 3 different IPs to gather 3 account inventory level and consolidate them “simultaneously”. Right now to change interface, I manually change routing to NIFs when switching account, but the process is slow and it’s accessing account one by one, even though the connections are simultaneously available, causing slight difference of the inventory level by the time 3rd account was checked out. My goal is to launch 3 threads of Mechanize agents to access the same URI (inventory.b2b.com/login) through 3 different NIFs (ppp1/eth2/ppp3) . As you suggested, if the client could not control the choice of NIFs, then I thought it should be done with NAT, Proxy or some sort of routing, but I am running out of idea. Could you give me a hint where should I look up to ? Thank you again in advance. John -- Posted via http://www.ruby-forum.com/.