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'm trying to set up a server (Apache) on my computer (fairly new to it). As I understand it, for it to be accessible to other computers, I need to forward port 80. When I try to forward the port though, I get the error: Server IP must be a LAN IP. I noticed in ipconfig that my default gateway is different than my wireless router. My computer is not hardwired, not on WiFi. Furthermore, I do not, at this point, have a static IP. I read that it should still work with a dynamic IP until it changes. Any ideas on what I can do?

share|improve this question
add comment

1 Answer

up vote 2 down vote accepted

The simplest (but not only) configuration to address this is as follows: The outside of the router has a dynamic OR static IP (the IP the provider gives you). This is on the port facing the provider. The LAN ports (facing your network) all use DHCP. The destination computer (the Apache server) has a static IP set in the DHCP range. An example, if you are using the 192.168.0.0 network (192.168.0.0 through 192.168.0.255) for DHCP purposes, you would set the server IP address to something inside that range (say 192.168.0.128). Then configure the router to always hand out that address (192.168.0.128) to your server (you'll do this based on the MAC address). Set port forwarding in the router (port 80) to the IP address of the server (192.168.0.128). I would also recommend turning on NAT in your router. Also know that if your ISP does not assign you a static address you'll need a service like DynDNS to associate your IP address to a domain name. If you don't plan to use a domain name you'll have to check your IP address and find out what it is to give to people so they can access your web server.

share|improve this answer
    
Thanks. That's the kind of information I was looking for. It'd be great if, instead of casting downvotes, people might actually provide a little information –  rphello101 Dec 10 '12 at 0:48
add comment

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.