Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I turned my pc into router by allowing port forwarding on port 80 and got my hostname( registered through Now i when i type my public ip address in browser i get redirected to my browser.

I have installed glassfish and have my website deployed in glassfish. I want that when i type my website should be opened. What all steps more i need to take? I have made a entry in etc/hosts file as :-

Please guide me. I am and beginner. Thanks in advance :)

share|improve this question
up vote 1 down vote accepted

Some routers does not like when the traffic does a U-turn (exits the router then goes right back in again to your web-server)

But to check if that is the case you can try this excellent service:

Is it down for everyone or just me?

If this is the case either change your routers behaviour (if possible) or use one of the many free proxies found on line. I use Hide My Ass not because it's particularly good but because I always remember the name.

share|improve this answer

First, unless you want to access your site via IP address, you'll need a domain name. The simplest option is to use a service such as DynDNS to forward a third-level domain to your IP address, such as If you would prefer a second-level domain, you'll need to purchase this from a registrar. You can use DynDNS for that too, but I'd instead recommend Go Daddy: their prices are very reasonable and they provide good tools for managing your domains.

Also, unless you've purchased business-class Internet service, there's a good chance your ISP blocks inbound port 80. In that case, you would need to choose a different port to run your web server on, then access the website by navigating to something like

share|improve this answer
Good answer. About blocking port 80: Try out if it's really blocked first. I never heared of ISPs blocking incoming traffic on port 80 - at least here in Germany andother members of the European Union. – lajuette May 19 '10 at 5:04
But i already registered my domain on dyndns for free. And when i type i get access to my router. So i don't think it is blocked. However what changes do i need to do to my glassfish because when i visit i get access to router and not my website. – TCM May 19 '10 at 5:43
You see the router's administration page? It sounds like you've turned on web management. What you want instead is to turn that off then forward port 80 to your computer. – Stephen Jennings May 19 '10 at 14:39

So your PC that's acting as a router is really acting as a NAPT gateway, and port 80 on your router is forwarded to port 8080 (GlassFish's default HTTP service port) on your GlassFish server box? And GlassFish is listening on port 8080 of that box?

If that's the case, then you should be getting a page served from GlassFish when you connect to port 80 on the public IP address of your router and issue an HTTP GET. If you're getting some sort of page served by your router, then port forwarding is not actually working on your router. Do you have some sort of HTTP server software package listening on port 80 on your router? Is it possible that that HTTP server is reserving port 80 and your NAPT gateway code isn't able to override that to forward those connections over to your GlassFish box?

Or maybe you forwarded port 80 to port 80 (instead of 8080), and you've got your OS's built-in HTTP server running on port 80 of the GlassFish box, and when you connect to it and get the default generic "you haven't set up your webserver yet" message, you thought it was coming from the router PC when it was actually coming from the PC you're running GlassFish on?

share|improve this answer
It's working now :) Somehow i managed to make it work though i don't know how i managed! – TCM May 19 '10 at 12:08

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .