• Welcome to Overclockers Forums! Join us to reply in threads, receive reduced ads, and to customize your site experience!

Setting up webserver leading to my DSL modem config! Uh oh

Overclockers is supported by our readers. When you click a link to make a purchase, we may earn a commission. Learn More.

@md0Cer

Senior Member
Joined
Nov 6, 2003
Location
Denver, CO
Hi, I am setting up apache, and went to try it out by typing in my domain name in firefox, and it led me to my config utility for my actiontec DSL modem. This isn't good because then people can access my wireless settings, etc.

Does anyone know what I can do to get around this problem? Thanks.
 
Fir you have to check if your modem answers on the outside interface or only inside your LAN on port 80. If it does from outside, only then it's bad. I'd advise you to buy another modem/router however since clearly something which ships with this as default is totally defective and unfit for general usage.

I guess you have port forwarded port 80 to your internal webserver IP on the router?
 
klingens said:
Fir you have to check if your modem answers on the outside interface or only inside your LAN on port 80. If it does from outside, only then it's bad. I'd advise you to buy another modem/router however since clearly something which ships with this as default is totally defective and unfit for general usage.

I guess you have port forwarded port 80 to your internal webserver IP on the router?


Thanks for the reply. To be honest, I am a newbie with this type of thing and I am not sure if I have port 80 forwarded. Im not even sure what that means or what it does. All I know is that I set up apache on the installation screen to port 80 running as a service.

On a laptop on my wireless network it takes me to the config, on my computer that is connected (wired) to the wireless/wired DSL modem, it also takes me to the config. I asked someone (outside of my network) to try it out, and nothing at all even loaded for them.
 
you need to forward port 80 to the rig's IP that is running Apache. Then outside hits will be directed to the server running apache although if you try to access it from inside your lan you could still get the router config.
 
From inside your network you'll have to use your local IP or UNC name to access the server, unless you edit your Hosts file to point your full domain name to the local IP of your webserver.

Chances are that since you are using your domain name and getting the actual IP of your internet connection, the router is serving you it's config page because you are on the trusted interface. That's why your friend didn't see it, since he is on the untrusted interface.

In your config page, look for Port Forwarding, and forward tcp (or all should work too I think if it's an option) on port 80 to the internal IP address of your webserver, and your friend should start seeing your web page.
 
If you have port 80 forwarded correctly, you're fine. I've got an Actiontec too, and the router runs a simple webserver on it which lets you access the configuration page. From within the network, you end up accessing the login page, though the rest of the world has port 80 forwarded to your computer. I think it's kinda stupid personally (the D-Link my parents have dosen't do this), and the only solution I've found is to edit your hosts file so that requests to yourdomain.com go to your computer's IP (that, or instead of going to yourdomain.com from within your network, always go to 192.168.0.X instead).

JigPu
 
Thanks a bunch everyone! When I have access to my computer again next week I will fiddle with it.

I will let everyone know how it does. :)
 
Hmm ok. Im not having any luck. In the actiontec modem config I tried messing with a port setting and had no luck.

I am really a newbie at this stuff. :(

So far, anything on my network or wireless network gets the config page, anything outside gets a timeout.


Also I have the no-ip "DUC" thing that makes sure to update my IP. It tells me a 200 something IP, not the usual 192.168.0.2 to access the dsl modem.


So even from that 200 something IP, I get this problem.
 
I saw the attached image below in my modem config with IP info.


I painted some of the numbers out because I am paranoid about security right now and am not sure if it is a good idea to be posting these IP's on the internet to a massive online forum.

Here are some apache settings I have that I am not sure what they really do, but I am guessing could be related:

#
# UseCanonicalName: Determines how Apache constructs self-referencing
# URLs and the SERVER_NAME and SERVER_PORT variables.
# When set "Off", Apache will use the Hostname and Port supplied
# by the client. When set "On", Apache will use the value of the
# ServerName directive.
#
UseCanonicalName Off

#
# Listen: Allows you to bind Apache to specific IP addresses and/or
# ports, instead of the default. See also the <VirtualHost>
# directive.
#
# Change this to Listen on specific IP addresses as shown below to
# prevent Apache from glomming onto all bound IP addresses (0.0.0.0)
#
#Listen 70.56.35.XX:80
Listen 80

#
# ServerName gives the name and port that the server uses to identify itself.
# This can often be determined automatically, but we recommend you specify
# it explicitly to prevent problems during startup.
#
# If this is not set to valid DNS name for your host, server-generated
# redirections will not work. See also the UseCanonicalName directive.
#
# If your host doesn't have a registered DNS name, enter its IP address here.
# You will have to access it by its address anyway, and this will make
# redirections work in a sensible way.
#
ServerName LocalHost:80
 

Attachments

  • ip trouble.JPG
    ip trouble.JPG
    17.1 KB · Views: 130
@md0Cer said:
I saw the attached image below in my modem config with IP info.


I painted some of the numbers out because I am paranoid about security right now and am not sure if it is a good idea to be posting these IP's on the internet to a massive online forum.

Here are some apache settings I have that I am not sure what they really do, but I am guessing could be related:
1) I'm pretty sure that "Listen 80" needs to include your IP address or the broadcast address. Try changing it to "Listen 192.168.0.2:80" or "Listen 0.0.0.0:80" (with, obviously, changes to "192.168.0.2" if that isn't the IP address of your server ;))

2) "ServerName LocalHost:80" should be whatever your domain name is through no-ip. For example, use "ServerName mycooldomain.no-ip.com:80" instead.

3) What happens if you try to access the server on the computer doing the serving? ie, if you open IE/Firefox on your server and go to localhost, what happens?

JigPu
 
3) The same thing, I get the config screen.

BTW, thanks a bunch everyone for all the help!
 
EDIT: Noticed you said if you goto your browser and type in localhost, you get the router config. That really isnt normal, as it is basically saying your localhost address is pointing to the router ip. Try going to 127.0.0.1 in your browser, and tell me what you get.

ok, so here is how it is. You need to, in your router, set it up to direct all requests to port 80 to your local IP. Seeing as how you mentioned 192.168.0.2, I will assume that is your IP. It also helps to make sure you have a static IP, not a DHCP assigned IP, so that you wont have to update your router forwarding settings each time.

Once you have your router setup to forward all port 80 requests to 192.168.0.2, anything that tries to access your WAN IP (the 200 address) on port 80, will go to your router, which sees it as a port 80 request. From there, it will look at its routing tables, and see that port 80 requests are supposed to go to 192.168.0.2, and it will forward the packet to that address, in this case, your computer, where Apache will pick up the packet (since it waits for port 80 requests), and will display everything in your htdocs folder (or wherever you might of changed it to. The htdocs folder is default)
 
127.0.0.1 actually works!

The 192.168.0.2 is the address that leads to the router/modem config utility.

Sould I try the WAN 76.blah that I have in my screenie?

That used to be a 200.blah, but it changed. I have the no-ip thing that changes what the domain name goes to and it shows up as my computer having the 76.blah ip.
 
Ok, in my router settings I assume it is "port forwarding?"

If so I messed with that and put in from ports 79 to 81 (not sure if it would let me do 80 to 80), and the 76.blah IP.
 

Attachments

  • ip2.JPG
    ip2.JPG
    29.4 KB · Views: 125
JigPu said:
1) I'm pretty sure that "Listen 80" needs to include your IP address or the broadcast address. Try changing it to "Listen 192.168.0.2:80" or "Listen 0.0.0.0:80" (with, obviously, changes to "192.168.0.2" if that isn't the IP address of your server ;))

2) "ServerName LocalHost:80" should be whatever your domain name is through no-ip. For example, use "ServerName mycooldomain.no-ip.com:80" instead.

3) What happens if you try to access the server on the computer doing the serving? ie, if you open IE/Firefox on your server and go to localhost, what happens?

JigPu


Tried the listen thing. It turned out the numbers I changed before were within the "#" things. So I changed that one to my 76.something IP. I couldn't get the apache service to restart after that, so I had to change it back to what it was. I may try putting the canonical name on this time though.
 
Oh! According to that cmd prompt, my "IP Address" is 192.168.0.2

Thats wierd though. That is what all qwest customers have to type in to access their DSL modem/router configs.

The no-ip thing still says my ip is the 76.whatever though.
 
Kendan said:
you put the IP of the rig you are running Apache on (192.168.x.x) in port forwarding not the outside IP.

Oh I see! I just figured it out I think (of course with the help of everyone here). To access the router config, you put in that 192.168.0.X, but I beleive the router assigns a different IP to each computer connected so if the config was 192.168.0.1 or something, the computer would then be assigned within the LAN as 192.168.0.2 or something. Then the next .3, .4 etc.

We shall see if that works when I get home. :)

Thanks a bunch everyone!


EDIT: That makes perfect sense! The 72. whatever is my outside IP that leads to the router/house, then from there it assigns the 192.168.whatever number to my computer, and that is what I am forwarding.

Thanks again! :D
 
Back