Jump to content

Multiple VM's with different IP's - Problem that needs a solution.

If you don't know the answer, maybe you know where to direct me... anything helps at this point.

 

Task is: I need to access a website to run a very specific stress test where I run an injection script from the visiting environment. The criteria is that the test site gets a connection from an increasing amount of pc's (1, 5, 10, 50). All of these execute their script and I try to find where the limitation of the test site is.

 

Currently solution: create a number of Oracle VM's and have each one access the site to complete the task, the issue is that all the machines are accessing the site from the same IP (host machine). This is an issue as all the connections must come from different IP's simultaneously.

 

Can anyone recommend any solutions?

Is my limitation hardware because of the single lane networking adapter?

Am I able to split my line without having the ISP manually give me static IP addresses?

 

Can anyone think of a solution outside of the box on this one?

Any help would be appreciated.

Link to comment
Share on other sites

Link to post
Share on other sites

Here's what I found:

If none of these answered your question then you can find more forums/sites on google talking about the same thing.

Some of these might be for Linux (I haven't checked tbh), but the general gist would be similar, I think at least

Link to comment
Share on other sites

Link to post
Share on other sites

4 minutes ago, John Ellmaker said:

Maybe I’m not absorbing your question exactly but it sounds like you could just run a vpn in each vm, like PIA or nordvpn

This was something I thought about but the cost would go through the roof even at 50. 50 x 5$ = 250$ a month... the idea is to go beyond that 50 limit at a later time. But I guess nothing in this world is free. Thanks!

4 minutes ago, lewdicrous said:

This is good stuff, I actually already read one of those but it wasn't applicable to my situation. I'll give the other 3 a good read.

Thank you!

Link to comment
Share on other sites

Link to post
Share on other sites

2 minutes ago, SmartenUp said:

This was something I thought about but the cost would go through the roof even at 50. 50 x 5$ = 250$ a month

You can go with free VPNs, but those might limit the up/down speeds

2 minutes ago, SmartenUp said:

This is good stuff, I actually already read one of those but it wasn't applicable to my situation. I'll give the other 3 a good read.

Thank you!

Anytime!

 

Cheers :)

Link to comment
Share on other sites

Link to post
Share on other sites

If the website that you're testing is located outside of your local network (in a datacenter somewhere), there's likely not much you can do if you're using IPv4 (aside from VPN/proxy, but having lots of unique IPs will probably take a reasonable amount of effort to achieve like that) - regardless of what you do with the networking within your network, at your router it will perform NAT and rewrite all of the addresses to the same external IP.

 

If you do have a public IPv6 address (I think you do), you will need to configure your virtual machines to be connected directly to the network (from memory, in VirtualBox that's done by setting the network adapter to BridgedAdapter, I don't know about others), then in theory it will just work, assuming the hypervisor networking supports IPv6, because each box will assign itself a unique globally routeable address.

Edited by colonel_mortis

HTTP/2 203

Link to comment
Share on other sites

Link to post
Share on other sites

3 minutes ago, lewdicrous said:

You can go with free VPNs, but those might limit the up/down speeds

Anytime!

 

Cheers :)

Out of curiousity, could you direct me to a free vpn that you know works without any gimmicks? Much appreciated.

Link to comment
Share on other sites

Link to post
Share on other sites

4 minutes ago, SmartenUp said:

Out of curiousity, could you direct me to a free vpn that you know works without any gimmicks? Much appreciated.

You can get free VPNs as add-ons/extensions on your browser, Chrome uses extensions (I think) and Firefox uses add-ons.

I don't know which ones work better than other cause I personally haven't looked into them, sorry.

Link to comment
Share on other sites

Link to post
Share on other sites

2 minutes ago, colonel_mortis said:

If the website that you're testing is located outside of your local network (in a datacenter somewhere), there's likely not much you can do if you're using IPv4 - regardless of what you do with the networking within your network, at your router it will perform NAT and rewrite all of the addresses to the same external IP.

If you do have a public IPv6 address (I think you do), you will need to configure your virtual machines to be connected directly to the network (from memory, in VirtualBox that's done by setting the network adapter to BridgedAdapter, I don't know about others), then in theory it will just work, assuming the hypervisor networking supports IPv6, because each box will assign itself a unique globally routeable address.

The website is outside the local network. I am using IPv4 and IPv6 on the host, the VM's appear to only have IPv4. The router does seem to be doing just that (rewriting all the addresses when it performs the NAT). Would getting on VPN's within the VM's allow the test site to distinguish where the connections are coming from? I will try the BridgedAdapter method in Oracle and see if that works (I saw this as an option, but haven't tested). Thank you for the reply.

Link to comment
Share on other sites

Link to post
Share on other sites

27 minutes ago, SmartenUp said:

I will try the BridgedAdapter method in Oracle and see if that works (I saw this as an option, but haven't tested).

Sadly I don't think this will help you. The address that is shown to the server is most likely the public IP address of the router your host PC is connected to. Using bridged adapter will just give the VMs unique IP addresses on the LAN side of your router, these will still be translated using NAT and the server will see the routers IP just as before :( 

 

EDIT:

The only way to get the server to see more IPs is to have more public IPs (VPNs or SSH tunnels, both of which require a computer to connect to, that someone has to pay for) or IPs on the same network as the server. If you could get a computer on the same network as the server you could use the bridged adapter technique as you would be able to make many IPs on the local network.

Link to comment
Share on other sites

Link to post
Share on other sites

22 minutes ago, Judgie97 said:

Sadly I don't think this will help you. The address that is shown to the server is most likely the public IP address of the router your host PC is connected to. Using bridged adapter will just give the VMs unique IP addresses on the LAN side of your router, these will still be translated using NAT and the server will see the routers IP just as before :( 

 

EDIT:

The only way to get the server to see more IPs is to have more public IPs (VPNs or SSH tunnels, both of which require a computer to connect to, that someone has to pay for) or IPs on the same network as the server. If you could get a computer on the same network as the server you could use the bridged adapter technique as you would be able to make many IPs on the local network.

Yep. I only resolved half the problem it seems. I can get 50 VM's running and all have internet, but that's where "free" runs out. I'll going to see if connecting through VPN's on the VM's will create additional IPv4 connections to the site. Thanks for your help!

 

P.S. That moment when you need to deliver a product within 48 hours and thoughts like "hmm, I guess I could order 50 internet lines" sound reasonable. 

Link to comment
Share on other sites

Link to post
Share on other sites

It depends what tests you are running if you can run them from low power machines probably Linux you could get 50 cheap linodes or AWS machines and run them from there. That might be cheaper than VPNs

 

And connecting through VPNs will create different connections to the site if they use different VPN end points. Different VPN providers or target locations, like choosing different countries, will show as different IPs. That seems like a lot of hassle though i guess it depends on the requirements

Link to comment
Share on other sites

Link to post
Share on other sites

4 minutes ago, Judgie97 said:

It depends what tests you are running if you can run them from low power machines probably Linux you could get 50 cheap linodes or AWS machines and run them from there. That might be cheaper than VPNs

I have come accross the AWS options a few times now and I'm not too familiar with linux, I'm going to try the VPN right now and if it fails... on to the next one!

Link to comment
Share on other sites

Link to post
Share on other sites

RESOLVED!

 

Using individually installed VPN's within each VM and routing all the connections through my bridged internet connections between 2 Telus 500 fiber lines, I'm getting just over 2.5MB Up/Down under full load on each VM. Thankfully tests only last  60 seconds each time, so the routers don't melt. Also had to migrate to multiple host machines since even with a single high end consumer grade desktop I was running out of dedicated CPU cores before I was running out of ram. Might have too look at some of those XEON solutions if this goes any further. 

 

Not entirely the way I wanted too, but it works now :)

 

Thanks everyone!

Link to comment
Share on other sites

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×