3

Would it be possible to launch several different python programs at once (via Popen) and have each one of them bind to a different interface?

Also once this is done does that mean all traffic coming from that python process will use that interface, since I plan to mix and match the urllib2, mechanize, and Ghost.py modules in the child processes.

5
  • What's the actual problem you are trying to solve? Do you want to listen on all traffic coming to the device? Do you want to assign different IP addresses to each of your processes? Commented May 29, 2013 at 5:31
  • The latter, Im trying to get each proccess to use a different IP address. Commented May 29, 2013 at 5:35
  • 2
    This not really a Python problem, but more of how Linux handles interface binding. It has been asked and answered at superuser.com. Commented May 29, 2013 at 5:40
  • But wouldn't messing with an OS's routing tables or something along those lines change the IP address everything on the entire computer uses? I've see some examples on bind to an network interface using Python's socket library, but I don't know if this can be done in a multiprocessing way. Commented May 29, 2013 at 5:46
  • routing tables don't change IP addresses, they only work for managing how traffic flows across a connection. Commented May 29, 2013 at 5:53

0

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.