# Webserver on KVM Guest....Port Forwarding Needed?

## dman777

Here is my setup:

1) Apartment with Time Warner ISP

2) Router with Gentoo system in back of it. I  use my gentoo system to surf the internet and the normal PC stuff that people do.

3) KVM guest on Gentoo system what will be Nginx websever

4) Tap networking with linux bridge.

I am putting up my own webpage just for the fun of it...in which I already bought a dns name. Do I need to open a custom port on my router and forward it to the KVM guest? Or will port 80 be used and the linux bridge will decide which host the web page request/response will go to?

----------

## cach0rr0

you will need to

-give the KVM guest a real IP (private IP is fine of course, plain old 192.168.x.y)

-set up a port forwarding rule on the router to forward port 80/443 to that internal IP

that does of course assume your ISP does not block inbound port 80. If it does, you'd have to use a different port that isnt blocked, which requires some experimentation

if you do have to use a different port, the procedure on the router is the same, however on nginx you will set it to listen on whichever alternate port (all controlled via /etc/nginx/nginx.conf )

----------

## dman777

Thanks. If I forward that port over to the KVM guest, will I still be able to use my browser on my host?

----------

## cach0rr0

 *dman777 wrote:*   

> Thanks. If I forward that port over to the KVM guest, will I still be able to use my browser on my host?

 

yep

that port forwarding rule only applies to *inbound* traffic destined for port 80 on your router (which then gets forwarded to your KVM guest), not *outbound* traffic to port 80 on various websites, so you should be fine (i do the same as you - my main beefy desktop hosts my KVM guests)

----------

