Change IP on every clone

Discussions related to using VirtualBox on Windows hosts.
acidburn
Posts: 6
Joined: 6. Feb 2019, 00:56

Change IP on every clone

Post by acidburn »

Hello everyone,
I've tried to change the IP address on VM but no success, can someone explain me how to change IP step-by-step?
BillG
Volunteer
Posts: 5105
Joined: 19. Sep 2009, 04:44
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Windows 10,7 and earlier
Location: Sydney, Australia

Re: Change IP on every clone

Post by BillG »

You have to change the MAC address first. If they have the same MAC address (which clones do) they are effectively identical and cannot have different IP addresses.
Bill
acidburn
Posts: 6
Joined: 6. Feb 2019, 00:56

Re: Change IP on every clone

Post by acidburn »

I've changed the Mac address and I've tried a proxy too, with the proxy on the broswer the ip was different, but was the same in hitleap viewer
mpack
Site Moderator
Posts: 39134
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Mostly XP

Re: Change IP on every clone

Post by mpack »

IP address is not a hardware label. IP is a soft label applied either by you or by a DHCP service. If assigned by you then there's no need to discuss it further. If using DHCP then you need to say which network and which DHCP you're on.
acidburn
Posts: 6
Joined: 6. Feb 2019, 00:56

Re: Change IP on every clone

Post by acidburn »

When I disable dhcp there's no connection, no one can drive me step-by-step?
mpack
Site Moderator
Posts: 39134
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Mostly XP

Re: Change IP on every clone

Post by mpack »

If you disable dhcp then that means you disabled the service that allocates IP addresses, meaning you need to assign them manually, consistent with your network. Otherwise nobody can use the network.

I'm sorry, but no, there is no tuition on this subject available on this site. Networking is a complex subject even for experts, and teaching you about them is beyond the scope of the VirtualBox forums. I suggest that you use Wikipedia or similar to find out how networks work, the role of Ethernet and Internet (IP), how IP network addresses are assigned, and what role the addresses play.

Most of us just let DHCP do the job it was created to do.
mpack
Site Moderator
Posts: 39134
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Mostly XP

Re: Change IP on every clone

Post by mpack »

In any case I rather suspect your ignorance is taking you up a blind alley. Why do you want IP addresses on a local network to all look like they're the same device? Are you aware that they all already have a single IP address on the Internet regardless of what you do locally?
acidburn
Posts: 6
Joined: 6. Feb 2019, 00:56

Re: Change IP on every clone

Post by acidburn »

Maybe you're don't understand and you accuse me of ignorance, on all my VM there's the same IP, I want all different IPs, you're talking about ignorance and you cannot explain how to change an IP
BillG
Volunteer
Posts: 5105
Joined: 19. Sep 2009, 04:44
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Windows 10,7 and earlier
Location: Sydney, Australia

Re: Change IP on every clone

Post by BillG »

Perhaps if you told us what you are trying to do (and why), and what sort of network you are talking about we would be able to help.
Bill
acidburn
Posts: 6
Joined: 6. Feb 2019, 00:56

Re: Change IP on every clone

Post by acidburn »

I have to change the ip on each different vm because all vm have the same ip, i only have to run hitleap viewer on each vm, nothing illegal or
transcendental
Martin
Volunteer
Posts: 2561
Joined: 30. May 2007, 18:05
Primary OS: Fedora other
VBox Version: PUEL
Guest OSses: XP, Win7, Win10, Linux, OS/2

Re: Change IP on every clone

Post by Martin »

If you are using default NAT all VMs will have "the same" IP because each one has it's own different virtual network behind NAT.
acidburn
Posts: 6
Joined: 6. Feb 2019, 00:56

Re: Change IP on every clone

Post by acidburn »

Martin wrote:If you are using default NAT all VMs will have "the same" IP because each one has it's own different virtual network behind NAT.
I've tried to set a proxy, it works on the browser ( the ip was different) but in the program the ip was the original. Howww??
mpack
Site Moderator
Posts: 39134
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Mostly XP

Re: Change IP on every clone

Post by mpack »

acidburn wrote:Maybe you're don't understand and you accuse me of ignorance
Ignorance is not an insult, it simply means that you don't have an adequate understanding of the subject matter. Also it wasn't an accusation, it is a self evident fact: everyone who asks a question is ignorant, otherwise they would not need to ask the question.

Let's try again: when a PC asks the local DHCP server for an IP address, the DHCP looks up the PC's MAC address in a table, and if found it returns the IP address already assigned. Or it can be forced to assign a new IP address, but either way the DHCP server only has one slot in the table for each MAC address it sees so it CANNOT successfully route messages to PCs (or VMs) with conflicting MACs. MACs are supposed to be globally unique so the protocols simply are not designed to cater for conflicts.

Now, provided the conflicting MAC problem is solved then each PC will have a unique IP address on the local network. However your local network is presumably behind a portal to your Internet provider. The packets leaving your local network and passing through that portal will all have a single IP address assigned to you by your Internet provider. If you interrogate your local network from another network (e.g. the cellular phone network) then you will only see one IP. You cannot make multiple VMs behave as if they have different external IP addresses, because those addresses only exist on the local network.
BillG
Volunteer
Posts: 5105
Joined: 19. Sep 2009, 04:44
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Windows 10,7 and earlier
Location: Sydney, Australia

Re: Change IP on every clone

Post by BillG »

Reading between the lines (since very little detail has been given) I would say that the OP is trying to make each clone look like an independent web site. Hitleap is a web traffic exchange service.
Bill
jcunha
Posts: 1
Joined: 2. Jan 2020, 23:36

Re: Change IP on every clone

Post by jcunha »

Try the following commands: (tested on ubuntu 18.04):
sudo ip address flush scope global dynamic
sudo dhclient -v
Post Reply