Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I forwarded port 80 to my Ubuntu Server VM, and the website is very much accessible locally. How do I allow incoming port 80 connection to Windows 7 (so it will be forwarded to the Ubuntu Server)?

share|improve this question
    
it should be sufficient to allow port 80 in windows firewall or whatever additional firewall you have installed –  pqnet Aug 17 at 16:39

2 Answers 2

I read your previous post and this seems to be a bit overkill.

If I understand properly,

  • You want to accept incoming request on your Windows 7 on port 80
  • Forward these requests to the VM, to port 80
  • handle those requests with a webserver inside the VM, listening on port 80

Why not set your Virtual Machine network into Bridged mode, and this way the Virtual Machine will get its own IP address, which you can access directly.

If you prefer to give that virtual machine a specific domain name, you can create a new domain-ip definition in the c:\Windows\System32\drivers\etc\hosts file. You can even modify localhost, but I suggest you leave it untouched and choose some other domain name (like: myvm.abc, it could be anything).

share|improve this answer
1  
Yes well, the network in question is wireless. Bridged networks doesn't play nice with wireless adapters. –  Oxwivi Dec 12 '11 at 13:05
    
Oh, and I did successfully SSH by doing the same thing to port 22 and opening it in the firewall. Maybe I should do just that. (I did that ages ago, so I forgot) –  Oxwivi Dec 12 '11 at 13:06
    
I use wireless network in bridged mode and I don't experience any problem. The only limitation is that bridged mode wifi can only handle IPv4 but that should not be a problem. –  karatedog Dec 12 '11 at 16:25
    
SSH? You mean you ssh'ed into the VM on its 10.xx.xx.xx IP address? –  karatedog Dec 12 '11 at 16:31
    
Well, I tried doing bridged, and it didn't even receive net connection. Yes, I had made it so that any TCP connection made to port 22 on Windows would be forwarded to the VM. –  Oxwivi Dec 12 '11 at 16:41

It sounds like to fix the problem that you're having with your setup is that you will need to route traffic from outside connections to the VM. To do this, you will need to go into your router's configuration and forward (pin hole) any traffic going to port 80 on TCP to the port 80 of your Windows 7 IP Address.

This will all be done on your router. If you have the model of your router, we may be able to come up with screenshots.

share|improve this answer
    
No, not outside connections, just the local network. –  Oxwivi Dec 12 '11 at 14:15

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.