I have a Ubuntu server that has multiple IP addresses. As an example, how do I set the correct IP address for outbound requests in a library like python requests?
Asked
Active
Viewed 2,084 times
4
-
Do you mean to ask if it is possible to configure the interface that the `requests` module uses? – DeepSpace Jul 11 '16 at 15:27
-
1Try the solution in this issue: https://github.com/kennethreitz/requests/issues/394 – Alden Jul 11 '16 at 15:30
-
1If you mean binding to a source address, look at the [requests toolbelt](https://toolbelt.readthedocs.io/en/latest/adapters.html#sourceaddressadapter). – Lex Scarisbrick Jul 11 '16 at 15:31