Accessing a server from the external IP

Discussion in 'Cisco' started by z1hou1, Jan 18, 2009.

  1. z1hou1

    z1hou1 Guest

    Hi,
    I have a Linksys WRT160N that I am trying to configure to a ubuntu
    server (8.10) running apache 2.0. I have been experimenting and
    decided to restart the apache web server on port 21229. The ubuntu
    server has a static IP 192.168.1.104. This machine is wired to the
    router. I manually entered this entry taking the MAC address from the
    HWaddr field after executing ifconfig.

    I then went into the router's "Forwarding a single port" option and
    redirected external port 21230 to 21229.

    From the 2 DHCP machines, I am able to access the Apache Web site
    using http://192.168.1.104:21229.

    I now wanted to access the machine 192.168.1.104 from the internet and
    was surprised to see that I did not see the IP of the DSL modem
    connected to the router. I always though that the "Status" menu will
    show that. It did not. Am I doing something totally wrong here? The
    Internet IP address it showed was 192.168.64.1.

    I then did a http://www.mywanip.com to get the internet address.

    But this is where my problem is. I am not able to access the apache2
    web server on 192.168.1.104 using http://<internet address>:21230. It
    just sits there....and finally times out.

    The Gufw firewall allows port 21229 - and this works when I access the
    apache2 web server from the 2 other boxes.

    Any help on the external access through the router will be
    appreciated.

    Thank you.
     
    z1hou1, Jan 18, 2009
    #1
    1. Advertising

  2. z1hou1

    Trendkill Guest

    On Jan 17, 10:51 pm, z1hou1 <> wrote:
    > Hi,
    > I have a Linksys WRT160N that I am trying to configure to a ubuntu
    > server (8.10) running apache 2.0. I have been experimenting and
    > decided to restart the apache web server on port 21229. The ubuntu
    > server has a static IP 192.168.1.104. This machine is wired to the
    > router. I manually entered this entry taking the MAC address from the
    > HWaddr field after executing ifconfig.
    >
    > I then went into the router's "Forwarding a single port" option and
    > redirected external port 21230 to 21229.
    >
    > From the 2 DHCP machines, I am able to access the Apache Web site
    > usinghttp://192.168.1.104:21229.
    >
    > I now wanted to access the machine 192.168.1.104 from the internet and
    > was surprised to see that I did not see the IP of the DSL modem
    > connected to the router. I always though that the "Status" menu will
    > show that. It did not. Am I doing something totally wrong here? The
    > Internet IP address it showed was 192.168.64.1.
    >
    > I then did ahttp://www.mywanip.comto get the internet address.
    >
    > But this is where my problem is. I am not able to access the apache2
    > web server on 192.168.1.104 using http://<internet address>:21230. It
    > just sits there....and finally times out.
    >
    > The Gufw firewall allows port 21229 - and this works when I access the
    > apache2 web server from the 2 other boxes.
    >
    > Any help on the external access through the router will be
    > appreciated.
    >
    > Thank you.


    This sounds right. On the 'status' page of your router (or something
    similar), you should be able to see the 'WAN' or 'Internet' interface
    IP, which should be a publicly routed address like 24.X.X.X. 10.x,
    192.168.x, 172.16-31.x are all internal and would not work on the net
    without NAT.

    On the config side, you're steps are spot on. You forward port 21230
    on the external side to 21229 on the inside (I've always matched 1:1
    meaning 21230 to 21230, but that should not be a requirement). Then
    addresses from the outside should be able to access your server
    without a problem.

    Of special note, you may not be able to hit that external URL from one
    of your inside boxes, because those lower end home routers don't
    always support the hairpin turn back into the router to only be nat'ed
    again. You really need to have someone try who is completely external
    to your network. If you need to monitor if your site is up, there are
    various tracking websites that will monitor a websites status (up or
    down) and send emails if something is down. Hope this helps.
     
    Trendkill, Jan 18, 2009
    #2
    1. Advertising

  3. z1hou1

    z1hou1 Guest

    Hi Trendkill,
    Thank you for getting back, and much appreciated.

    I think the issue is my ADSL router. I am not a networking expert, but
    this is what I think I should do. As I said, the Internet IP on my
    status page of the Linksys WRT160N shows 192.168.1.64. This really
    does not make sense to me at all. What I forgot to mention in my
    earlier post was that between my Linksys and the internet port, is the
    ADSL router. I think I have to get onto the ADSL router
    (192.168.1.254) and place my Linksys router on the DMZ. Does this make
    sense? I will try it out a little later.

    I did ask my friend to try the actual address I got out of http://www.mywanip.com
    and it hung for him too.

    When I was in a different part of the country I had used Cable for my
    internet, and I did not have the problem. I was able to make the
    hairpin turn and access my web server.

    Again, thanks for your help.
     
    z1hou1, Jan 18, 2009
    #3
  4. z1hou1

    Morph Guest

    In the message
    <>
    z1hou1 wrote:

    | Hi Trendkill,
    | Thank you for getting back, and much appreciated.
    |
    | I think the issue is my ADSL router. I am not a networking expert, but
    | this is what I think I should do. As I said, the Internet IP on my
    | status page of the Linksys WRT160N shows 192.168.1.64. This really
    | does not make sense to me at all. What I forgot to mention in my
    | earlier post was that between my Linksys and the internet port, is the
    | ADSL router. I think I have to get onto the ADSL router
    | (192.168.1.254) and place my Linksys router on the DMZ. Does this make
    | sense? I will try it out a little later.
    |
    | I did ask my friend to try the actual address I got out of http://www.mywanip.com
    | and it hung for him too.
    |
    | When I was in a different part of the country I had used Cable for my
    | internet, and I did not have the problem. I was able to make the
    | hairpin turn and access my web server.
    |
    | Again, thanks for your help.

    Do you have two routers between the server and the internet?
    If yes then you should do two port forwards on both routers.
    On the first router (the one closer to the internet) you set it up to
    forward let's say port 30000 to the port 30000 of the "internet" address
    of your second router. Then on the second router you should again set it
    up to forward port 30000 on it's "internet" address to some port (let's
    say port 30001) of the address of your server. You then setup your
    server to listen on port 30001.
     
    Morph, Jan 18, 2009
    #4
  5. z1hou1

    z1hou1 Guest

    Hi,
    I logged into my ADSL router (192.168.1.254) - in effect the Motorola
    2210. But I don't find any option for port forwarding. The 2210 right
    now is setup with the PPP option. The other option is the PPPoE
    option. I do know between all of this, this should work. I will keep
    trying though. In the meantime, here is a summary of what I am
    trying...
    I am trying to reach a web server on port 21229 on one of my machines.
    I have a ADSL based internet connection connected to a Motorola 2210
    router.
    The Motorola 2210 router is then connected to a Linksys WRT160N
    router. Two machines are wired and a third is on wireless.
    One of the wired machines on the Linksys had a static IP, and it is on
    this machine I have started an Apache web server on port 22129.
    I have configured the Linksys router to forward incoming port 21230 to
    21229 on 192.168.1.104
    The above arrangement worked well with Cable modems and Cable based
    internet. Does not seem to work well with ADSL.
    My http://<external-ip:21229> goes no where.
    My http//192.168.1.104:21229 works correctly from all my local
    machines.

    Thanks.
     
    z1hou1, Jan 19, 2009
    #5
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. GeekMarine1972
    Replies:
    1
    Views:
    1,314
    Walter Roberson
    Jan 15, 2005
  2. Replies:
    3
    Views:
    3,914
    Jaroslaw Skórka
    Mar 7, 2005
  3. =?Utf-8?B?Sm9obkhCb3lk?=

    Accessing an external hard drive

    =?Utf-8?B?Sm9obkhCb3lk?=, Jan 6, 2007, in forum: Wireless Networking
    Replies:
    3
    Views:
    387
    Jack \(MVP-Networking\).
    Jan 8, 2007
  4. Replies:
    3
    Views:
    1,069
  5. Franco Proctor

    Problems accessing external sata drive

    Franco Proctor, Apr 25, 2009, in forum: Computer Support
    Replies:
    7
    Views:
    936
Loading...

Share This Page