You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by João Gil ACE-SC <jo...@edis.edp.pt> on 2004/09/17 15:54:26 UTC

[users@httpd] How to Configure Apache to work behind router with a dynamic IP

Greetings,

  I am using Apache 2.x on Windows XP behind a Speedtouch Router.

  It works fine within the lan using localhost or accessing the computer
  on which  Apache is on (ie 10.0.0.1). But when I try to access my server
  with my Internet IP address, which I obtain from www.whatismyip.com, my
  site is not found/reachable.

  I at first thought that it was a problem with my router NAT forwarding to
  my
  computer but now I think that it might have something to do with my
  httpd.conf.

  Can anyone tell me how to configure my Apache configuration file to work
  with
  Dynamic IP? What should my ServerName be?

  Thanks in advance.

  Warmest Regards
  Joao Gil



---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] How to Configure Apache to work behind router with a dynamic IP

Posted by Viktor Soderqvist <vi...@knoeffnet.net>.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

It's because you use NAT if your connection looks like this:

Internet -> (ext IP, ie 82.31.45.6) Router -> (int IP, ie 10.0.0.1) Server

Which it does, judged from your email. I would suggest you setup DMZ or
port forwarding on your router. Or use your server as a router. Either
one is fine really. Just don't reply and ask how to set up your router
for portforwarding or DMZ configuration - your manual, and sure
*multiple* pages on the internet tell you this (I don't). Google is your
friend. Good luck!

Servername should be your ext IP or an eventual DNS (such as .dyndns.org).


Regards
Viktor

João Gil ACE-SC said the following on 2004-09-17 15:54:
| Greetings,
|
|   I am using Apache 2.x on Windows XP behind a Speedtouch Router.
|
|   It works fine within the lan using localhost or accessing the computer
|   on which  Apache is on (ie 10.0.0.1). But when I try to access my server
|   with my Internet IP address, which I obtain from www.whatismyip.com, my
|   site is not found/reachable.
|
|   I at first thought that it was a problem with my router NAT
forwarding to
|   my
|   computer but now I think that it might have something to do with my
|   httpd.conf.
|
|   Can anyone tell me how to configure my Apache configuration file to work
|   with
|   Dynamic IP? What should my ServerName be?
|
|   Thanks in advance.
|
|   Warmest Regards
|   Joao Gil
|
|
|
| ---------------------------------------------------------------------
| The official User-To-User support forum of the Apache HTTP Server Project.
| See <URL:http://httpd.apache.org/userslist.html> for more info.
| To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
|    "   from the digest: users-digest-unsubscribe@httpd.apache.org
| For additional commands, e-mail: users-help@httpd.apache.org
|
|
|
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.5 (MingW32)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org

iD8DBQFBS1C3RBT9Xu7Ivl8RAnjFAJ9cxg5ooeCvfB1kMGAhHv7G+KT5qQCePXin
ouhVPnn74EtR73yUb89L3h8=
=4ke8
-----END PGP SIGNATURE-----

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] How to Configure Apache to work behind router with a dynamic IP

Posted by Brian Parish <cl...@swiftdsl.com.au>.
On Fri, 2004-09-17 at 14:54 +0100, João Gil ACE-SC wrote:
> Greetings,
> 
>   I am using Apache 2.x on Windows XP behind a Speedtouch Router.
> 
>   It works fine within the lan using localhost or accessing the computer
>   on which  Apache is on (ie 10.0.0.1). But when I try to access my server
>   with my Internet IP address, which I obtain from www.whatismyip.com, my
>   site is not found/reachable.
> 
>   I at first thought that it was a problem with my router NAT forwarding to
>   my
>   computer but now I think that it might have something to do with my
>   httpd.conf.
> 
>   Can anyone tell me how to configure my Apache configuration file to work
>   with
>   Dynamic IP? What should my ServerName be?
> 
>   Thanks in advance.
> 
>   Warmest Regards
>   Joao Gil
> 
You need to forward port 80 on your router to the IP of your apache
server.  The speedtouch only allows this using the text interface, so
you'll need to (assuming the router is set at 10.0.0.138):

telnet 10.0.0.138
login
nat
create
tcp
10.0.0.1
80
0
80
save

There are prompts from the router along the way of course, but these are
the responses to get you what you need.

HTH
Brian
-- 


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


RE: [users@httpd] How to Configure Apache to work behind router with a dynamic IP

Posted by "David P. Donahue" <dd...@ccs.neu.edu>.
You may also wish to note which piece of hardware on your network is
actually holding your public IP (as obtained from whatismyip.com).
Attempts to access that IP from within the network may be perceived
differently by such hardware than attempts from outside the network.

For example, on my DSL connection it is the DSL modem which holds the
public IP.  And this same modem has a web interface for configuration.
Thus, any attempts from within the network to go to my public IP result
in seeing the configuration page.  From outside the network, however,
port 80 requests are forwarded correctly and everything works fine.  My
solution for my LAN machines was to edit the hosts files and point my
domain name at the proper internal IP.

The only thing I can think of in httpd.conf that would relate to this
would be the ServerName directive (not sure if that has changed in
Apache 2, I'm using 1.3.31).  This could cause problems if the server
name being returned isn't properly qualifiable from the client.  It
should be something that any client can browse to, both inside your LAN
and outside.



> -----Original Message-----
> From: Al Sparks [mailto:data345@yahoo.com] 
> Sent: Friday, September 17, 2004 2:45 PM
> To: users@httpd.apache.org
> Subject: Re: [users@httpd] How to Configure Apache to work 
> behind router with a dynamic IP
> 
> 
> It's probably not your http conf file.  It's more likely your 
> network settings.  Make sure your server has a "gateway" 
> included in your network configuration.  Without that, it 
> won't know where to send packets that are supposed to be 
> outside your LAN.
> 
> The gateway IP address should be your router's IP address.
> 
> Also make sure your router is allowing port 80 connections 
> from outside.
>   === Al
> 
> --- João Gil ACE-SC <jo...@edis.edp.pt> wrote:
> 
> > 
> > Greetings,
> > 
> >   I am using Apache 2.x on Windows XP behind a Speedtouch Router.
> > 
> >   It works fine within the lan using localhost or accessing 
> the computer
> >   on which  Apache is on (ie 10.0.0.1). But when I try to 
> access my server
> >   with my Internet IP address, which I obtain from 
www.whatismyip.com, my
>   site is not found/reachable.
> 
>   I at first thought that it was a problem with my router NAT
forwarding to
>   my
>   computer but now I think that it might have something to do with my
>   httpd.conf.
> 
>   Can anyone tell me how to configure my Apache configuration file to
work
>   with
>   Dynamic IP? What should my ServerName be?
> 
>   Thanks in advance.
> 
>   Warmest Regards
>   Joao Gil
> 
> 
> 
> ---------------------------------------------------------------------
> The official User-To-User support forum of the Apache HTTP Server 
> Project. See <URL:http://httpd.apache.org/userslist.html> for more 
> info. To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
>    "   from the digest: users-digest-unsubscribe@httpd.apache.org
> For additional commands, e-mail: users-help@httpd.apache.org
> 
> 


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server
Project. See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org



---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] How to Configure Apache to work behind router with a dynamic IP

Posted by Al Sparks <da...@yahoo.com>.
It's probably not your http conf file.  It's more likely your network
settings.  Make sure your server has a "gateway" included in your
network configuration.  Without that, it won't know where to send
packets that are supposed to be outside your LAN.

The gateway IP address should be your router's IP address.

Also make sure your router is allowing port 80 connections from outside.
  === Al

--- Jo�o Gil ACE-SC <jo...@edis.edp.pt> wrote:

> 
> Greetings,
> 
>   I am using Apache 2.x on Windows XP behind a Speedtouch Router.
> 
>   It works fine within the lan using localhost or accessing the computer
>   on which  Apache is on (ie 10.0.0.1). But when I try to access my server
>   with my Internet IP address, which I obtain from www.whatismyip.com, my
>   site is not found/reachable.
> 
>   I at first thought that it was a problem with my router NAT forwarding to
>   my
>   computer but now I think that it might have something to do with my
>   httpd.conf.
> 
>   Can anyone tell me how to configure my Apache configuration file to work
>   with
>   Dynamic IP? What should my ServerName be?
> 
>   Thanks in advance.
> 
>   Warmest Regards
>   Joao Gil
> 
> 
> 
> ---------------------------------------------------------------------
> The official User-To-User support forum of the Apache HTTP Server Project.
> See <URL:http://httpd.apache.org/userslist.html> for more info.
> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
>    "   from the digest: users-digest-unsubscribe@httpd.apache.org
> For additional commands, e-mail: users-help@httpd.apache.org
> 
> 


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org