Page 1 of 1

PureBasic webserver problem

Posted: Fri Feb 04, 2005 10:03 pm
by kenmo
This is less of a PB question and more of a networking question: I have programmed a server application in PB based on the included server example's http processing, but I can only access the "site" through the two computers on this network.

Here's some details: I have XP SP2, so before you say "turn off Windows firewall" or something, don't worry, I already have port 80 allowed automatically. The program successfully creates a server on port 80. As far as I can tell, I have incoming port 80 requests correctly forwarded to this computer. While the server is running, I can only get to the server files if I use this computer's LAN IP. Nobody including me can access the files by my WAN IP, which is obviously the point of a web server. And also, others can successfully ping my WAN IP, whether or not that matters.

So if any networking buffs here have any suggestions, please help. This kind of thing would be much easier to discuss by instant message, if anyone can help and has AIM, my name is "ethnobomb".

Thanks in advance...?

Edit: By the way, I have cable internet and am on a 2-computer router.

Posted: Sat Feb 19, 2005 12:34 pm
by tss
I think that your problem is the port forwarding on your router. I know you mentioned that you feel this is set up correctly, but everything points to this as your problem, unless your ISP is blocking port 80 on your connection.

Having a webserver listen on a port usually means that the server will listen on the same port for all NIC's installed and configured in your machine.
i.e. There should be no problem listening on the same port for multiple LAN addresses.

The WAN address is your router (usually, depending on your setup), so normally you set the port to forward to the correct LAN IP (do you have internal DHCP? or fixed LAN addresses?).

You need a way in which you can access your server from outside of your LAN, simply by trying to access via your WAN IP address from inside your LAN is usually what people try to do, and this doesn't work.

You may also try changing the Port # to a something which your ISP may not be blocking (i.e. dont try 21).

Hope this helps, rather than hinders.
TSS

Posted: Wed Mar 02, 2005 8:15 pm
by dell_jockey
you have to tell your router that port 80 requests from the outside should be forwarded to the (LAN internal-) IP of your webserver. It's not enough to just let the firewall inside your router pass on port 80 requests. You also have to inform it about the IP address of the PC running the web service.
On SMC-router, you'll find these configuration settings under 'Virtual Server'. I don't know how it's called with other makes of router.

Hope this helps.