All new Registrations are manually reviewed and approved, so a short delay after registration may occur before your account becomes active.
How to rotate ip in centos or ubuntu.
my OpenVZ vps using 2xipv4 & 2xipv6
23.54.xx.102
23.54.xx.103
2604:xxxx:1::xxxx:6x0b
2604:xxxx:1::xxxx:5x7c
Now I want to rotate my ip so when I run any PHP,ruby or curl command rotate my ip. I am doing a test with curl 'https://api.ipify.org?format=json' show me same ip.
root@local:~#curl 'https://api.ipify.org?format=json' {"ip":"23.54.xx.102"}
root@local:~#curl 'https://api.ipify.org?format=json' {"ip":"23.54.xx.102"}
root@local:~#curl 'https://api.ipify.org?format=json' {"ip":"23.54.xx.102"}
I used some iptables rules but the result is same and not rotating ip.
I want result
root@local:~#curl 'https://api.ipify.org?format=json' {"ip":"23.54.xx.102"}
root@local:~#curl 'https://api.ipify.org?format=json' {"ip":"23.54.xx.103"}
root@local:~#curl 'https://api.ipify.org?format=json' {"ip":"2604:xxxx:1::xxxx:6x0b"}
root@local:~#curl 'https://api.ipify.org?format=json' {"ip":"2604:xxxx:1::xxxx:5x7c"}
Requesting expert to help me.
Comments
before you ask, what have you tried? you should state them, might help those coming here later in answering your question
https://curl.haxx.se/docs/manpage.html
but what to do when i want to run ruby or php script.
http://stackoverflow.com/questions/2425651/select-outgoing-ip-for-curl-request
It's possible from the control panel (SolusVM or any other). Find something like "Default ip" and change its value to the second one (xx.103)
http://php.net/manual/en/function.curl-setopt.php
Note the "CURLOPT_INTERFACE" entry.
thiz should do the job, not tested:
CURLOPT_INTERFACE The name of the outgoing network interface to use. This can be an interface name, an IP address or a host name.