Accessing a server from the external IP

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

formatting link
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://: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.

Reply to
z1hou1
Loading thread data ...

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.

Reply to
Trendkill

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

formatting link
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.

Reply to
z1hou1

| 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

formatting link
| 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.

Reply to
Morph

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:// goes no where. My http//192.168.1.104:21229 works correctly from all my local machines.

Thanks.

Reply to
z1hou1

it sounds like your adsl router (192.168.1.254) is set up to act as a router that also hand out DHCP address's and NAT's traffic and everything.. this should really be set up as a *Bridge* to just pass traffic through it and let your firewall (the linksys router) do all the nat'ing/dhcp stuff.

Reply to
b3nder

Cabling-Design.com Forums website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.