Answer the question
In order to leave comments, you need to log in
How to change ip address?
Hello. There is one service, there is a limit on the number of requests per second (by IP), which needs to be bypassed (all for good purposes :)
To do this, I need to change the IP, but change it so that the answers come to me. I've read that this can be done with source routing, and it's simple in theory, but how does it work in practice?
In general, everything works like this: I have a server to which clients make requests through the site. On the server - nginx catches them, php-fpm processes them, makes a request to this service using curl, receives a response, supplements it as it should, and returns it to clients - in general, everything is as usual.
Previously, everything worked fine from my one ip, but now they have introduced a limit on the number of requests. Therefore, I want to use the ip of incoming requests (users of the site) to make requests to a third-party service. Unfortunately, the service does not provide an opportunity to increase the number of requests from one ip, even for money.
F/N Users will make these requests in any way (it's just more convenient through my website), so my conscience is clear))
Answer the question
In order to leave comments, you need to log in
I've read that this can be done with source routing, and it's simple in theory, but how does it work in practice?No way. Source routing uses IP options. Packets containing IP options (in particular, LSRR/SSRR) are recommended to be filtered by default ( BCP186 , for example), which is what happens in reality.
1) Use a proxy server. The most popular solution in such cases.
2) Use VPN to the machine with a different address.
can be done using source routing
Install tor on your server. And curl --socks5 127.0.0.1 9050
If necessary, change ip - /etc/init.d/tor restart
Add an IP address to the server you are making requests from.
If the service you are contacting is available via IPv6 - generally a freebie. If only for IPv4 - well, what can you do, you have to spend money, but since you have several thousand requests per minute, it's probably worth it. Although sorry, what is there to spend, 3000 per minute is about 50 per second, 10 per IP, / 29 (8 addresses) should be enough for you, for reliability / 28 (16 addresses), it costs 500-1000 rubles per month, depending on where to take.
Fasten additional IPs, put in a random distribution, thus relieving the load.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question