VMware Communities
schomke
Contributor
Contributor
Jump to solution

Use Host VPN in VMware Workstation guest

Hi all.

I have configured VPN on Windws 10 Pro host machine.

I would like to know how to configure guest VmWare network to use this VPN, and enable communication with devices via this VPN.

Is there any tutorial how to do that.

If you need additional information I will share it with you.

Thanks a lot in advance.

Best regards,

Miloš

0 Kudos
1 Solution

Accepted Solutions
schomke
Contributor
Contributor
Jump to solution

Solved...

All connection must be set to Optain IP address automaticaly...on host and guest machine.

After that on guest machine use VMnet8 adapter (NAT).

View solution in original post

0 Kudos
6 Replies
scott28tt
VMware Employee
VMware Employee
Jump to solution

Do you mean that you want to VPN into the host OS in order to access the guest OSes running inside your VMs?


-------------------------------------------------------------------------------------------------------------------------------------------------------------

Although I am a VMware employee I contribute to VMware Communities voluntarily (ie. not in any official capacity)
VMware Training & Certification blog
0 Kudos
schomke
Contributor
Contributor
Jump to solution

I would like to allow guest system (VMware) to use VPN configured on host macine, and access devices in that VPN...

Bassicaly, guest bridged to host VPN, and have possibility to connect devices in that network...

Sorry, I'm not expert in this field, and maybe my answers at first will not be good Smiley Sad

I find some post which looks like what I'm want:

https://superuser.com/questions/842489/vm-share-hosts-vpn-connection/907244

But I'm not completely sure what to do?

0 Kudos
schomke
Contributor
Contributor
Jump to solution

Solved...

All connection must be set to Optain IP address automaticaly...on host and guest machine.

After that on guest machine use VMnet8 adapter (NAT).

0 Kudos
zekaiLi
Contributor
Contributor
Jump to solution

     Is this really going to work?Can you share the detailed steps?This problem has been bothering me for a long time

0 Kudos
dobraccoon
Contributor
Contributor
Jump to solution

I found a solution here: https://communities.vmware.com/t5/VMware-Fusion-Discussions/Share-host-VPN-with-guest/m-p/2809728#M1...
Thanks to users:
https://communities.vmware.com/t5/user/viewprofilepage/user-id/5451486 and https://communities.vmware.com/t5/user/viewprofilepage/user-id/5449363

For convenience, I made 2 files, you need unzip them into one folder


You need to do the following:

1. Go to the directory with files

2. sudo chmod 775 update_vm_net_rules_script.sh

3. Start VPN

4. Start the guest OS in VMWare

5. Find your VPN alias using the ifconfig command. I have a VPN network alias = utun2

6. Determine the IP of the guest OS: I have 172.16.56.1

7. Change the values ​​of utun2 and IP of the guest OS in the new_vm_network_rules.conf file to your own

8. run * .sh with the command: sudo ./update_vm_net_rules_script.sh

The result will display the rule settings for VMWare

!!! Each time you restart VPN or VMWare, you need to do steps 5,7,8
Files code:


1. new_vm_network_rules.conf:

<code>
#Find your vpn network alias by command: ifconfig
#Edit line like:
#nat on <your vpn network alias> inet from <Your VM(guest) IP>.0/24 to any ->(<your vpn network alias>) extfilter ei
#Completed example: nat on utun2 inet from 172.16.56.0/24 to any -> (utun2) extfilter ei
nat on utun2 inet from 172.16.56.0/24 to any -> (utun2) extfilter ei
<code>

2. update_vm_net_rules_script.sh
<code>
#! /bin/bash
path=$(pwd)
cd $path
sudo pfctl -a com.apple.internet-sharing/shared_v4 -N -f new_vm_network_rules.conf 2>/dev/null
sudo pfctl -a com.apple.internet-sharing/shared_v4 -s nat 2>/dev/null
<code>
0 Kudos
jc31
Contributor
Contributor
Jump to solution

I was wondering something a little different if can answer this please. I have a windows that has NordVPN app downloaded on to the hard drive. This means everything done thorough my computer is always run through the NordVPN location. I them downloaded VMware onto this computer. So when I run the VMware virtual desktop on this computer, would it be going through this same VPN, or would it go directly through my normal internet, or would it go through its own VMware location?

 

Thanks

0 Kudos