0

I'm working on a spam detection engine (early stages).

I've deployed my spam detection engine on a web server and to test it I need to access the remote resource repeatedly with different client IP addresses.

How do I go about doing this?

I know the following about dynamic IP addresses:

  • I get a different IP address each time I reboot my computer (DHCP)
  • I can connect to a VPN to a different IP (I can't do this repeatedly because one VPN may only give me a handful of IP addresses)
  • I can connect via a proxy (same problem as above)

What's the best way to do this?

It's good if it works on Windows or Ubuntu.

6
  • Wouldn't it be much easier if your spam detection engine used your known IP (use something like DynDNS to make it known to the engine) and would switch into a mode where it garbles the IP in this case and thereby pretends it's a different IP every time? This is deterministic and it should be less time-consuming than having to reboot a PC. Also It's more likely you'd have to reboot your router than your PC. Jun 20, 2015 at 18:03
  • @0xC0000022L I'm not sure I understand. Can you explain it simpler terms? Are you suggesting that the engine assumes IP addresses by itself? I'm afraid that wouldn't help because this testing is also to serve as a prototype which I can show people.
    – learner
    Jun 20, 2015 at 18:07
  • 1
    Your supposition about DHCP is incorrect. Once the DHCP server hands you an IP address, you generally get to keep that IP until you ask for a new one, and even then, the DHCP server may (and probably will) just give you the same IP address again. I know this from working with the network where I worked before retiring and from repeated checks of my own IP address at home. This having been said, I cannot rule out the possibility that some DHCP servers will, indeed, give you a new IP every time it sees your machine log on to the network, but none that I have worked with have done so.
    – BillDOe
    Jun 20, 2015 at 18:22
  • what about connecting via a tor browser using various endpoints? Jun 20, 2015 at 18:57
  • 1
    @learner: the people to which you would show it would use actual different IPs. So what? Still for your own IP you could simulate the behavior of an ever-changing IP address in order to test all your assumptions. Look, I get it, you want to try the real thing. Nothing wrong with that. But in order to get it right first, it might make sense to start with a simulation of what you expect to see. Jun 20, 2015 at 19:41

1 Answer 1

0

I like @0xC0000022L's "mode switch" idea. It seems like it should work for you, particularly for your testing.

There are at least a few ways to make this scheme work for the case where you are demonstrating it to other people.

  1. Build a webpage that you can visit and supply a list of one or more IPs or even ranges of IP's that treated in this special testing mode. An advantage for this in testing is that you can add additional customization actions to that page like setting various thresholds, reset various status, restarting various activities, clearing datasets, etc.
  2. Similarly, you could do the same by sending a specifically formatted email through the server with coded instructions to add remove IP's from the "demo" list or any number of other customizations and tweaks.
  3. Again, similarly, transfer a file (FTP) to the server to provide these coded instructions.

Of course all these features would be removed/disabled in the "production" version.

As far as your original question about changing your IP repeatedly: For me, there are 2 ways I can get a new public IP Address.

If I power the router down for a minimum of 12 hours, when I turn the router back on, it gets a new IP Address. This of course is not a workable solution for what you want to do.

The other way... if I edit the MAC Address in my router, changing it to any "random" address, and then do a soft reset on the router, it gets a new IP Address. A complication with this is that there could be a problem (most likely would be a problem), if the "random" MAC Address you choose duplicates an existing MAC Address on the network, there could be a conflict that prevents connectivity.

Also, depending on how frequently you want to change your IP Address, and over what period of time you want to make those changes, there are 2 other issues:

  1. If you change the MAC address back to a previously used MAC Address too soon (for me it's 12 hours), you will get back the previous IP Address as well.
  2. The IP Address that is given to the router is assigned from a pool of IP Addresses. It is not unlimited, or even likely to be a very large number, and may even be a relative "handful" of possible IP Addresses that could be assigned to the router before they begin to be reused.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .