Answer the question
In order to leave comments, you need to log in
How to make requests on multiple ip?
Good day. There is a dedicated server and in addition to the main ip address there is an additional one. I need to make requests to various sites on the Internet so that I can choose from which ip address a given request will be made. How can I do that?
Answer the question
In order to leave comments, you need to log in
I would solve this issue by installing a squid proxy on this computer. Set up the squid in such a way that when accessing 3128, requests from one IP leave, when accessing 3129 from the second IP.
In the application that requests, simply add the use of proxy 127.0.0.1:3128/3129
It depends on what and how it should be)
Here is from man curl:
--interface
Perform an operation using a specified interface. You can enter interface name, IP address or host name. An example could look like:
curl --interface eth0:1 www.netscape.com
If this option is used several times, the last one will be used.
When a socket is created with socket(2), it exists in a name space
(address family) but has no address assigned to it. bind() assigns
the address specified by addr to the socket referred to by the file
descriptor sockfd. addrlen specifies the size, in bytes, of the
address structure pointed to by addr. Traditionally, this operation
is called “assigning a name to a socket”.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question