Solved

Sharing Network Connection in VMware

Posted on 2013-12-31
9
36 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
Backup Your Microsoft Windows Server®

Backup all your Microsoft Windows Server – on-premises, in remote locations, in private and hybrid clouds. Your entire Windows Server will be backed up in one easy step with patented, block-level disk imaging. We achieve RTOs (recovery time objectives) as low as 15 seconds.

 

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

Complete VMware vSphere® ESX(i) & Hyper-V Backup

Capture your entire system, including the host, with patented disk imaging integrated with VMware VADP / Microsoft VSS and RCT. RTOs is as low as 15 seconds with Acronis Active Restore™. You can enjoy unlimited P2V/V2V migrations from any source (even from a different hypervisor)

Question has a verified solution.

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

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
Connecting to an Amazon Linux EC2 Instance from Windows Using PuTTY.
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.

912 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

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now