Solved

Sharing Network Connection in VMware

Posted on 2013-12-31
9
37 Views
Last Modified: 2016-01-02
Hi guys,

I have some trouble setting up a shared network connection in VMware for man in the middle. This is pretty straight forward when I do it without VMware as I can simply use Laptop A as mitm but I need to get this working on VMware.

Here's my setup:
Laptop A has a Linux distro (Backtrack) setup in VMware.
Laptop A is connected the network on its NIC.
Laptop B is connected to Laptop A via USB port with a "USB to Ethernet" adapter.

I need the Backtrack VM on Laptop A to act as man in the middle between Laptop B and the network that Laptop A is connected to. I tried configuring a bridge, NAT, and host only connection on VMware, and then shared the internet from Laptop A NIC to the VM NIC interface. Anyone tried sharing network between an onboard NIC and a USB NIC interface, and have it work on VMware? What's the proper way to do this?

Thanks all and happy new year!
0
Comment
Question by:demallic
  • 4
  • 3
9 Comments
 
LVL 13

Expert Comment

by:Abhilash
ID: 39749710
Hi demallic,

If MITM is what you want to achieve immaterial of where you want to do it, you could do it using three Virtual machines using  VMware workstation.

If its a must that you need to do this with the setup you are talking about. It kind of gets tricky because of the networking in workstation.

Host only is out of question here as it is used only when you have a internal communication between the virtual machines. But in your case you need to talk to the network outside.

When you use NAT there is no separate IP shown for your VM on the external network.
Instead, a separate private network is set up on the host computer. this too is out of question as you need the VM to have a IP to test pinging and other things while performing the MITM.

Now lets get to Bridged. Bridged networking connects a virtual machine to a network using the host computer’s Ethernet adapter. If your host computer is on an Ethernet network ,this is often the easiest way to give your virtual machine access to that network. If you use bridged networking, your vm is a full participant in the network. It has access to other machines on the network and can be contacted by other machines on the network as if it were a physical computer on the network.

You need to try getting it work with Bridged.
But my suggestion would be to either go with three VM's and try it
Or try it with three physical machines. The mixing of both gets it complicated.
0
 

Author Comment

by:demallic
ID: 39750013
Thanks Abhilashhb! Unfortunately, I have to use the mixed setup with physical machine and a VM.

When I tried the Bridged network setup the VM was able to get DHCP fine but I'm not sure how to setup MITM without affecting the entire network.

So here's what I have for Bridged network:
VM bridged to Laptop A's Network on ethernet interface.
Laptop B gets shared network from Laptop A.
VM man in the middle as Laptop A to get all the traffic.

This doesn't work as Laptop B isn't getting the IP correctly... does Laptop A need to configure DHCP or manually assign static IP to Laptop B?

Thanks again!
0
 
LVL 13

Expert Comment

by:Abhilash
ID: 39750023
As far as all the three(Laptop A, the VM and the laptop B) fall in the same subnet and are able  to ping each other it should be fine. That way the VM can act as MITM.
0
VMware Disaster Recovery and Data Protection

In this expert guide, you’ll learn about the components of a Modern Data Center. You will use cases for the value-added capabilities of Veeam®, including combining backup and replication for VMware disaster recovery and using replication for data center migration.

 

Author Comment

by:demallic
ID: 39750026
The problem is that Laptop B isn't getting DHCP and it can't talk to the network. Also it's kind of risky to MITM in our network, I'd like to setup a private subnet for the VM and Laptop B.
0
 
LVL 13

Expert Comment

by:Abhilash
ID: 39750035
Assign a Static IP for the Laptop B in the DHCP range of VM. That would put all three of them in their own private subnet.
0
 

Author Comment

by:demallic
ID: 39750037
But Laptop B is getting DHCP from our production network via the Bridged Connection. Anyway to have it bridged and still assign a static IP?
0
 
LVL 13

Accepted Solution

by:
Abhilash earned 500 total points
ID: 39750042
See at the end of the day you will need two systems talking in a network. And another system which will be able to spoof the traffic and act as a MITM and receive/forward the traffic. The requirement for that is to get the machines to work in same subnet.
So yes, If it is allowed, change the IP of Laptop B to Ip in the DHCP range so that it satisfies your requirement.
0

Featured Post

Master Your Team's Linux and Cloud Stack

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
ESX 6.0 Best Practices for datastore size 5 76
vmsn files 11 49
VMware Tools Install On Linux Problem 3 59
Patching ESXi Host via PowerCLI 9 8
In this article, I will show you HOW TO: Perform a Physical to Virtual (P2V) Conversion the easy way from a computer backup (image).
Fine Tune your automatic Updates for Ubuntu / Debian
Teach the user how to rename, unmount, delete and upgrade VMFS datastores. Open vSphere Web Client: Rename VMFS and NFS datastores: Upgrade VMFS-3 volume to VMFS-5: Unmount VMFS datastore: Delete a VMFS datastore:
Teach the user how to configure vSphere Replication and how to protect and recover VMs Open vSphere Web Client: Verify vsphere Replication is enabled: Enable vSphere Replication for a virtual machine: Verify replicated VM is created: Recover replica…

776 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question