VMware Communities
Lacer
Enthusiast
Enthusiast
Jump to solution

Fusion 8.5 problems with custom NAT settings with Port Forwarding: NAT adapter not working and network settings pane grayed out

I'm trying to set up NAT networking in my VMware Fusion 8.5.6 Pro environment using a hard-coded IP address in the DHCP settings along with port forwarding in the NAT configuration settings.  In general, I am attempting to follow the process described at https://medium.com/@tuweizhong/how-to-setup-port-forward-at-vmware-fusion-8-for-os-x-742ad6ca1344 which seemed to provide the best documentation on how to set this up.

I first tried creating a new, custom network configuration (which showed up as vmnet3), but I abandoned that and just tried getting the existing vmnet8 NAT adapter to work.

I first edited (via sudo nano) my vmnet8 dhcpd.conf file (located in /Library/Preferences/VMware Fusion/vmnet8) to add a fixed IP address.  I made sure the address was outside the reserved IP range within the "DO NOT CHANGE" section of the dhcpd.conf file.

# Configuration file for ISC 2.0 vmnet-dhcpd operating on vmnet8.

#

# This file was automatically generated by the VMware configuration program.

# See Instructions below if you want to modify it.

#

# We set domain-name-servers to make some DHCP clients happy

# (dhclient as configured in SuSE, TurboLinux, etc.).

# We also supply a domain name to make pump (Red Hat 6.x) happy.

#

###### VMNET DHCP Configuration. Start of "DO NOT MODIFY SECTION" #####

# Modification Instructions: This section of the configuration file contains

# information generated by the configuration program. Do not modify this

# section.

# You are free to modify everything else. Also, this section must start

# on a new line

# This file will get backed up with a different name in the same directory

# if this section is edited and you try to configure DHCP again.

# Written at: 04/26/2017 11:39:58

allow unknown-clients;

default-lease-time 1800;                # default is 30 minutes

max-lease-time 7200;                    # default is 2 hours

subnet 192.168.110.0 netmask 255.255.255.0 {

  range 192.168.110.128 192.168.110.254;

  option broadcast-address 192.168.110.255;

  option domain-name-servers 192.168.110.2;

  option domain-name localdomain;

  default-lease-time 1800;                # default is 30 minutes

  max-lease-time 7200;                    # default is 2 hours

  option netbios-name-servers 192.168.110.2;

  option routers 192.168.110.2;

}

host vmnet8 {

  hardware ethernet 00:50:56:C0:00:08;

  fixed-address 192.168.110.1;

  option domain-name-servers 0.0.0.0;

  option domain-name "";

  option routers 0.0.0.0;

}

####### VMNET DHCP Configuration. End of "DO NOT MODIFY SECTION" #######

host R9NoBIM {

hardware ethernet 00:50:56:3E:44:20;

fixed-address 192.168.110.50;

}

My VM name is R9NoBIM.  Per the instructions on the first URL above, I set the host to the name of my VM.  (Is this what it should be?  I also tried using vmnet8 as the host here, thinking that this section would override the "DO NOT MODIFY" section above, but that didn't work, either.)

I quit, then restarted Fusion.

I then edited my nat.conf file to add the port, 8001 (http) that I wished to have forwarded, using the IP address I designated in the dhcpd.conf file above:

# VMware NAT configuration file

[host]

# NAT gateway address

ip = 192.168.110.2

netmask = 255.255.255.0

# VMnet device if not specified on command line

device = vmnet8

# Allow PORT/EPRT FTP commands (they need incoming TCP stream ...)

activeFTP = 1

# Allows the source to have any OUI.  Turn this on if you change the OUI

# in the MAC address of your virtual machines.

allowAnyOUI = 1

# Controls if (TCP) connections should be reset when the adapter they are

# bound to goes down

resetConnectionOnLinkDown = 1

# Controls if (TCP) connection should be reset when guest packet's destination

# is NAT's IP address

resetConnectionOnDestLocalHost = 1

# Controls if enable nat ipv6

natIp6Enable = 0

# Controls if enable nat ipv6

natIp6Prefix = fd15:4ba5:5a2b:1008::/64

[tcp]

# Value of timeout in TCP TIME_WAIT state, in seconds

timeWaitTimeout = 30

[udp]

# Timeout in seconds. Dynamically-created UDP mappings will purged if

# idle for this duration of time 0 = no timeout, default = 60; real

# value might be up to 100% longer

timeout = 60

[netbios]

# Timeout for NBNS queries.

nbnsTimeout = 2

# Number of retries for each NBNS query.

nbnsRetries = 3

# Timeout for NBDS queries.

nbdsTimeout = 3

[incomingtcp]

# Use these with care - anyone can enter into your VM through these...

# The format and example are as follows:

#<external port number> = <VM's IP address>:<VM's port number>

#8080 = 172.16.3.128:80

8001 = 192.168.110.50:8001

[incomingudp]

# UDP port forwarding example

#6000 = 172.16.3.0:6001

After this I stopped, then restarted my networking by running the following commands in Terminal:

sudo /Applications/VMware\ Fusion.app/Contents/Library/vmnet-cli --stop

sudo /Applications/VMware\ Fusion.app/Contents/Library/vmnet-cli --start

I confirmed that the networking file within the /Library/Preferences/VMware\ Fusion directory reflected the NAT entry:

VERSION=1,0

answer VNET_1_DHCP yes

answer VNET_1_DHCP_CFG_HASH 946E9174153882B15F5D274344959525D511212F

answer VNET_1_HOSTONLY_NETMASK 255.255.255.0

answer VNET_1_HOSTONLY_SUBNET 192.168.37.0

answer VNET_1_VIRTUAL_ADAPTER yes

answer VNET_8_DHCP yes

answer VNET_8_DHCP_CFG_HASH F171831A724DDD8020D6584939B78429F35D4E1D

answer VNET_8_HOSTONLY_NETMASK 255.255.255.0

answer VNET_8_HOSTONLY_SUBNET 192.168.110.0

answer VNET_8_NAT yes

answer VNET_8_VIRTUAL_ADAPTER yes

add_nat_portfwd 8 tcp 8001 192.168.110.50 8001

add_bridge_mapping en0 2

I've tried various configurations, using different adapters, etc., but I came back to the simplest approach of modifying the vmnet8, default NAT adapter.  After making my first attempt, and ever since then, the Networking settings for both the general Fusion Preferences > Networking, as well as the Network Settings pane for my VM are all grayed out, not allowing me to change them.  I've seen this posted elsewhere (as in  Network Settings options greyed out in Fusion Pro 7.1.0 ), but I haven't been able to get the ability to change the settings via the GUI to be restored, even after following a variety of tips that seemed to work for others.

Here is the general Fusion Network Settings pane. Even though I've unlocked the settings at the bottom, the settings pane remains grayed out:

Fusion Network Settings.png

Here is the Network Settings pane for my specific VM, also completely grayed out an uneducable:

VM Network Settings locked.png

I am able to change the network adapter via the Virtual Machine > Network Adapter menu, but when I select NAT, the VM client (Windows 2012) just reports that the Media State of the adapter is "Media disconnected".

VM Network Settings Menu.png

I found a post that recommended checking the vnetlib log for errors.  Here is the section at the end of the log that gets written after restarting the vmware networking:

##multiple lines consisting of the following two lines##

Apr 26 11:37:03 VNLAdapterStatus - ioctl: SIOCGIFFLAGS failed, error: Device not configured

Apr 26 11:37:04 VNLAdapterStatus - ioctl: SIOCGIFFLAGS failed, error: Device not configured

Apr 26 11:37:04 VNL_EnableNetworkAdapter - Successfully enabled hostonly adapter on vnet: vmnet1

Apr 26 11:37:04 VNL_StartService - Started "DHCP" service for vnet: vmnet1

Apr 26 11:37:04 VNLNetCfgLookupNATPortFwd - List of NAT forwarded ports is empty

Apr 26 11:37:04 VNLNATReadPortForward - Failed to read TCP port forward config info.

Apr 26 11:37:04 VNL_StartService - Started "NAT" service for vnet: vmnet8

Apr 26 11:37:04 VNLAdapterStatus - ioctl: SIOCGIFFLAGS failed, error: Device not configured

Apr 26 11:37:04 VNL_EnableNetworkAdInternet Software Consortium DHCP Server 2.0

Copyright 1995, 1996, 1997, 1998, 1999 The Internet Software Consortium.

All rights reserved.

Please contribute if you find this software useful.

For info, please visit http://www.isc.org/dhcp-contrib.html

Configured subnet: 192.168.110.0

Setting vmnet-dhcp IP address: 192.168.110.254

Opened: `J,Qˇ

Recving on     VNet/vmnet8/192.168.110.0

Sending on     VNet/vmnet8/192.168.110.0

apter - Successfully enabled hostonly adapter on vnet: vmnet8

Apr 26 11:37:04 VNL_StartService - Started "DHCP" service for vnet: vmnet8

Apr 26 11:37:04 VNL_Unload - Vnetlib unloaded.

The Bridged networking adapter works without any problem.  But in the setup I'm needing to establish I need to use NAT with an IP address that doesn't change, so I can rely on my port forwarding rules to work.

Any help on this would be greatly appreciated!

Reply
0 Kudos
1 Solution

Accepted Solutions
Lacer
Enthusiast
Enthusiast
Jump to solution

For the historical record, I believe restarting the host resulting in the above configuration working correctly.  Definitely a pain to have to restart the host after such changes are made, but as I recall this resolved the problem.

View solution in original post

Reply
0 Kudos
6 Replies
Lacer
Enthusiast
Enthusiast
Jump to solution

Is anyone at least aware of any VMware documentation on how to use the dhcpd.conf and nat.conf files to configure NAT?

Reply
0 Kudos
Lacer
Enthusiast
Enthusiast
Jump to solution

Just a bump on this question. Is there anyone in the community that has expertise in this area that could shed some light on this configuration?

And on the issue of the grayed-out settings, it appears the only way to get this resolved is to restart the host machine.

Reply
0 Kudos
nancyz
VMware Employee
VMware Employee
Jump to solution

Hi Lacer ,

Welcome to Fusion community.

Could you please restart your Mac OS and see it this problem still exists? Thanks.

Reply
0 Kudos
nancyz
VMware Employee
VMware Employee
Jump to solution

Is port 8001 already used by other application/process on your Mac OS?

add_nat_portfwd 8 tcp 8001 192.168.110.50 8001 

add_bridge_mapping en0 2

Reply
0 Kudos
Greywire421
Contributor
Contributor
Jump to solution

Check /var/log/vnetlib for hints, e.g.:

Jun 24 17:08:47 VNLAdapterStatus - ioctl: SIOCGIFFLAGS failed, error: Device not configured

Jun 24 17:08:47 VNLAdapterStatuInternet Software Consortium DHCP Server 2.0

Copyright 1995, 1996, 1997, 1998, 1999 The Internet Software Consortium.

All rights reserved.

Please contribute if you find this software useful.

For info, please visit http://www.isc.org/dhcp-contrib.html

/Library/Preferences/VMware Fusion/vmnet1/dhcpd.conf line 45: semicolon expected.

See also https://linux.die.net/man/5/dhcp-options

Reply
0 Kudos
Lacer
Enthusiast
Enthusiast
Jump to solution

For the historical record, I believe restarting the host resulting in the above configuration working correctly.  Definitely a pain to have to restart the host after such changes are made, but as I recall this resolved the problem.

Reply
0 Kudos