views:

1323

answers:

5

Hi

Is it possible for me to change or assign my server a new IP address every time it needs to make a http request with commands such as wget?

Thanks all

Update

The reason for this is exactly what the Tor project is trying to achieve. I do not want to leave a trace of what requests my server makes and I thought constantly changing my IP address could help me and my users use the internet without being followed around. :)

+4  A: 

If you have a large pool of proxies you can use, then I suppose you could switch between them, but otherwise no, you generally can't just renew your IP address whenever you feel like it.

You might want to look into Tor, an anonymizing network which does something like what you're asking about.

David Zaslavsky
Thanks for the link to Tor. I'll use it as an example next time someone wants to restrict access by IP address or wants to use it to determine the location of the caller. Hint to all: IP address belongs to the Network layer and not to the Application layer!
John Saunders
A: 

The first question to ask is, how would you change the IP address of your server once? In general, you will need the cooperation of your ISP, and even then, they will only have a limited size pool of IP addresses to offer you.

Changing the IP address of your server while it's up will cause any existing connections to eventually fail (because packets from the remote server won't find their own way back to your server, which just moved). So, you would need to set up multiple IP addresses on your server simultaneously, which is possible but again requires the cooperation of your ISP. There will also be a practical limit of how many IP addresses you can assign to your single computer.

The advantage of something like Tor is that requests might come from anywhere in the world. IP addresses are divided up by country and then allocated to ISPs, so there would be no way for your ISP to give you an IP address in the range assigned to Germany, for example (assuming you're not in Germany to begin with).

Greg Hewgill
+1  A: 

If you have multiple IP numbers already assigned to your machine, you can pass an argument to wget as follows:

wget --bind-address=364.293.991.800 http://address.you.are.secretly.visiting/

However, if you have multiple IP numbers assigned they will all be from the same pool of IPs provided by your ISP. I don't think this is what you mean - it sounds like you want to use random different addresses from different pools so that you can't be traced. You will need to use remote proxies for this, so something like Tor is the right suggestion.

You might want to clarify the question a bit, though: do you want to hide yourself from the websites you are accessing, or from your own ISP, or from someone who is potentially monitoring your web traffic?

If it's the websites, Tor or other proxying services are the answer. If it's your ISP, don't bother. And if you are not in China the latter is unlikely to be an issue, unless you're paranoid. I know some people who are worried about this kind of thing, but I think they're nuts.

Leigh Caldwell
lol i assure i am totally sane! Its the websites i want to hide from so Tor and proxy servives sounds good to me.
Abs
+4  A: 

If feel that people who ask questions like this one that are borderline unethical, should provide an explanation for how they intend to use the information provided in the responses in an ethical fashion.

If you have a large pool of IP addresses at your disposal, you may be able to switch between them. This is the reason, however, why there are bot networks out there - because criminals can't really hide their own IP addresses, so they have to use other people's.

cdonner
A: 

i know the secure idea to change the ip address The detail is given in url http://www.visapreparation.blogspot.com/