Skip to content

Instantly share code, notes, and snippets.

@davidrenne
Created November 14, 2013 15:21
Show Gist options
  • Star 3 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save davidrenne/7468636 to your computer and use it in GitHub Desktop.
Save davidrenne/7468636 to your computer and use it in GitHub Desktop.
VMWARE Port forwarding instructions
Testing with Internet Explorer / NAT Port Forwarding
It is possible to connect to the rails server inside the linux virtual machine from the host computer.
This allows testing the development site with Internet Explorer.
Note: This assumes the CentOS vm is running in NAT networking mode.
1) Find out what ip address the vm is using. Open a terminal in the vm and run /sbin/ifconfig
For this example the eth0 inet addr is 192.168.179.128.
2) Open System > Administration > Security Level and Firewall. (Enter the root password if necessary.)
3) On the "Firewall Options" tab, open the "Other ports" section and add ports 3000 and 8080.
4) Click ok and confirm the changes.
2) On the windows host, open C:\ProgramData\VMware\vmnetnat.conf with a text editor.
3) Look for the "[incomingtcp]" section towards the end of the file.
4) Add the lines (adjust to the vm's actual ip)
3000 = 192.168.179.128:3000
8080 = 192.168.179.128:8080
5) Restart the "VMWare NAT Service" or reboot Windows.
6) Make sure that a rails server is running on port 3000 (in the CentOS vm) and open http://localhost:3000 with Internet Explorer.
@Pably8D
Copy link

Pably8D commented May 7, 2021

Thanks it was really useful !!!

@davidrenne
Copy link
Author

@Pably8D no problem

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment