Forum Moderators: open

Message Too Old, No Replies

Port forwarding on home router issue

Having a small problem getting port forwarding working...

         

bhonda

11:06 pm on Mar 17, 2006 (gmt 0)

10+ Year Member



Hey guys....quick question...

I've set my router up here at home to forward on port 80 to one of my test servers....but I'm fairly (read:very) new to this and I guess I've missed a step somewhere...whenever I access my external IP address it asks for a username and password (for my router), but I don't want this - I want to be forwarded!

If someone could shed some light on this it would be greatly appreciated! Ta!

B

mack

6:39 pm on Mar 18, 2006 (gmt 0)

WebmasterWorld Administrator 10+ Year Member Top Contributors Of The Month



This is a pretty common fault when you have a server on the same LAN as the PC you are surfing from. It's complicated to explain but I will try...

The router is used to handling requests from the outside and forwarding them to the corresponding machine. In your case all port 80 traffic will be passed on port 80 to your test server. From the inside however your router treats these requests very differently. Any request that passes through the router from the inside will not pass through it, it will be presented with the router login page instead.

A good example is being inside your house and trying to post a letter to yourself.

One work around I have found is to alter the hosts file on your pc (the one you are surfing with) and add the following entry.

outside.ip.address server.lan.address

This means that every time you use the external address, your P will not request that address, it will instead send an http request for the servers internal IP.

If you have a domain name pointing to your ip address you could add the following to your hosts file.

www.example.com server.lap.ip.address

this way if www.example.com is typed into the address bar, your pc will request the servers LAN ip address instead of the domain.

Hope this helps.

Mack.

bhonda

4:55 pm on Mar 20, 2006 (gmt 0)

10+ Year Member



Cheers Mack! Thanks for explaining it - I could have seen myself working on this for days before realising it was actually working!

mack

9:45 pm on Mar 20, 2006 (gmt 0)

WebmasterWorld Administrator 10+ Year Member Top Contributors Of The Month



Glad I could help, had the exact same situation myself.. Tool a while to figure it out!

Mack.