[Solved] Testing on VMware but can't get NAT to work

Hi. I am new to OpenWrt and so testing it on VMWare.

I have set up two interfaces:-

The first is the original one on the virtual disk image and is labeled LAN. It is connected to a VMWare Virtual Lan and has an IP of Another VM connected to the same Virtual Lan has full connectivity - I can ping both ways and access OpenWrt's LuCI GUI. Perfect.

The second interface, which I created and labeled WAN. It is bridged to the host system and has an IP of

The back to the VM on the virtual network and it can ping (The OpenWrt LAN interface), also (The OpenWrt WAN interface) but no further. So I can not ping (which is my actual router to the internet) from the VM on the virtual network but can from OpenWrt console.

It has to be a masquerading issue or some such. I have the default Firewall settings as show here:

Any suggestions?

Should have added that I have, under General Settings, set Forward to accept other wise I got destination port unreachable from the VM's ping command.

You can collect the diagnostics and post it to pastebin.com:

ubus call system board; uci show network; uci show dhcp; uci show firewall; \
ip address show; ip route show table all; ip rule show; iptables-save -c; \
head -v -n -0 /etc/resolv.* /tmp/resolv.* /tmp/resolv.*/*

Many thanks for the quick response.

All the outputs are here:

I know the DNS is a mess and that is why I have used ping to ping actual known addresses. DHCP on the Virtual Network is handled outside OpenWrt but I manually added a default route on the VM that I used to test with.

1 Like
uci rename network.WAN="wan"
uci commit network
/etc/init.d/network restart

Thanks for the response. I have now made OpenWrt responsible for dhcp on the lan and have dns forwarding working fine so I assume I should just do:

uci rename network.WAN="wan"
uci set network.lan.defaultroute="0"
uci commit network
/etc/init.d/network restart

Do I still need? :

uci set network.lan.peerdns="0"

I will test tomorrow

1 Like

If you want OpenWrt to serve DHCP:

  • Set up the respective interface statically.
  • Disable other DHCP servers on that network.

The client-specific interface options become irrelevant.

OK, all working now, many thanks. Seemed the crucial change was 'WAN' being renamed to 'wan'.

If your problem is solved, please consider marking this topic as [Solved]. See How to mark a topic as [Solved] for a short how-to.

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.