In this case both host and guest are running Linux machine. And the gust's network setting is NAT.
1. grap guest ip address, showing 192.168.64.132 in my case.
ip add
2. Modify section
[incomingtcp]
of
/etc/vmware/vmnet8/nat/nat.conf
file in host operation system, by adding the following line to the file:
#forward port 8080 of host machine to port 8080 of virtual machine
8080 = 192.168.64.132:8080
3. save and restart Vmware network
vmware-networks --stop
vmware-networks --start
4. check and make sure that the forwarding port in guest system is open.
sudo vim /etc/sysconfig/iptables
-A INPUT -m state --state NEW -m tcp -p tcp --dport 8080 -j ACCEPT
No comments:
Post a Comment