How to open my virtual machine to the Internet

user211174 asked:

I have problem, basicly cause im suck in English and TCP/IP things.
So:
I have CentOS 5.9 running on my host server. With eth0 interface.
I have 4 additional IP with eth0:0 eth0:1 etc..
I have Mask 255.255.255.248 with broadcast ip.

I installed CentOS 6.5 on vmx (vmware). Run this machine by VMPlayer in bridge, host-only, nat things. And I was trying to show this machine to Internet.. Accessing to his IP through outside.

I tryied:
Host Machine:
ifconfig eth0:3 down
on Guest Machine configure the free IP with broadcast and other things expect gateway.
(Bridge Mode)

HostOnly method:
Give Open IP to my Guest, add IP forwarding on my server, > IP ROUTE ADD GUESTIP VIA INTERNALIP…

And I failed to open my virtual machine to the Internet. Also I tried IP TABLES, SNAT, DNAT. But I suck in IPTables so. Help me..

If there is variant where I can forward 80,22,443 ports only on eth0:3 its also good help me alot. Thx.

Sorry For my Bad english.


I answered:

Configure your virtual network in bridged mode, but do not assign the IP address on the host. Only assign the IP address in the guest.


View the full question and answer on Server Fault.

Creative Commons License
This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License.