LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Trying to make local web page accessible from internet (IP question) (https://www.linuxquestions.org/questions/linux-newbie-8/trying-to-make-local-web-page-accessible-from-internet-ip-question-852030/)

SkyerSK 12-23-2010 10:03 AM

Trying to make local web page accessible from internet (IP question)
 
Hello,
topic is little bit complex, and there could be many things needed to be fixed, but I'd like to ask you simple question.

Network topology: Modem ----- Router ---- Computer (and other pcs)

On computer, I have apache server, configured at port 80, running. In local network, web page is accessible by my local IP (192...). Although, when I want to get to the page from the internet, I don't know right ip address, since router's one should be local, and also, router has it's own web page running at port 80.

So I guessed that my server IP would be modem's one, which I don't know. Sometime in past, I figured out address of modem too, but it has it's own application running. Also, router supports port forwarding (which I guess, is needed), but I don't know how to get using to it.

So, what address from internet should I have? How should I determine it?

(hope my question makes sense to you).

Thanks.

camorri 12-23-2010 10:55 AM

Let me see if I can help.

The internet address you are looking for will be somewhere in your router configuration. On mine, I can see it in a Status panel. I have a Linksys router model WRT160Nv2. To see your IP address, it helps to understand home routers. They have two sides. The one side your PC's are connected to. Most home routers run NAT, Network Address Translation. The IP addresses of your systems you can control in your router configuration.

The other side connects to your modem and then to your ISP. This is the address you need in order to do the connection you want. To find it you need to connect to your router through the HTTP connection. Consult your user guide that came with the router. This interface is usually password protected, assuming you set that up during installation. You did, didn't you?

Beyond that, you will need to set up port forwarding in the router, to the system with the Apache server you want exposed to the internet. That will be in the setup guide, somewhere. Some router have Help files on the configuration pages. Often that is enough.

Now the next problem has to do with your ISP. How do they assign your IP address? The one on the internet side. If it is DHCP ( many ISP's do just this ), then you are a moving target. In other works the IP address is changed from time to time. ie, if you restart the network ( router ) because of a power outage.

There are ways around this, but I'm no expert.

Next, you need to consult your ISP to find out if they will allow you to run a web server on your service. Many of them do not allow that, since it generates a lot of traffic, you may not be paying for. Better to find you before the blacklist you. Polices vary, so check first.

Last thought, see if your ISP subscription gives you a free web server service. Mine does, the amount of storage is limited, but its included, for $20 a month. My daughter uses it for her horse breeding service.

Hope this helps.

SkyerSK 12-23-2010 11:06 AM

Thanks for your answer,
first I found that page is not accessible from local LAN either (I am working on it currently), so sorry for misinformation.

I am not planning to use my computer as web server, just want to try it, to get better understanding of networking, and things related to it.

I'll go check router setup right away and yes, password is set up. Although if I got you right, I didn't use strong password, since my LAN consists of few computers of my family members.

(I'll be back with results soon)...

ilvista 12-23-2010 12:14 PM

camorri is right,just one more thought.even if you have a dynamic ip address you still can access your web server from the outside using for expemple dyndns(Dynamic DNS) ,and of course port forwarding.you can use the router panel admin,or just use http://www.whatismyip.com/

SkyerSK 12-23-2010 01:14 PM

Ok I tried IP Address listed in router's menu (as item "wan ip Address"), address on whatsmyip.com, and neither works. I feel little bit hopeless, not sure whats wrong. Should be IP of router, port forwarding is set up (from port 80 to my port 80), apache is running, and allowing all connections (just in case..). Any help? Thanks

szboardstretcher 12-23-2010 01:17 PM

There is a possibility that your router has two internal addresses, because your Modem is a firewall as well.

In that case, you will have to get the external IP address from the modem, or by going to ipchicken.com and noting the external address.

From there, you will have to forward the correct ports, to get the traffic into the network. Also, you *SHOULD NOT* have your external router interface set up to be a GUI. That should be accessible only from internal.

SkyerSK 12-23-2010 01:29 PM

Ok, thanks for your answers. IP from ipchicken didn't work either (btw it's a bit different than other ips I've seen here, so could you please specify me where that IP comes from?).

But, as I mentioned before, address marked as router's wan address didn't work. It does not work up till now, but at least, it has got to logs, so there should be some other problem. Picking up message from log:
Code:

Dec 23 2010 20:24:56 GMT+0100 (CET) ADPM ep 57984 ipa 133 ip 57984 UNo4
Not sure what it is, but it goes into log every time I try to access IP wrote above. Do you know what does the message mean? Thanks.

SkyerSK 12-23-2010 01:55 PM

Alright, I got it. I am sorry about taking your time guys. After some time, I managed to use netcat to make some other tests. (...)

Then I finally got it - (little evil quiet) firewall I installed (configured) about 9-10 months ago, which was, of course, blocking all incoming connections. Thread solved. Thanks for your help again...

edit: (question about ipchicken remains)

szboardstretcher 12-27-2010 12:43 PM

Quote:

Originally Posted by SkyerSK (Post 4201421)
Alright, I got it. I am sorry about taking your time guys. After some time, I managed to use netcat to make some other tests. (...)

Then I finally got it - (little evil quiet) firewall I installed (configured) about 9-10 months ago, which was, of course, blocking all incoming connections. Thread solved. Thanks for your help again...

edit: (question about ipchicken remains)

Your Cable modem has an IP address assigned by your ISP. If you go to a site, that is the IP address that that website will see. This is called an "External" IP address. IPChicken just displays your External address, which is useful sometimes for troubleshooting. Especially in complicated setups, where you ask "What IP am I coming out of this datacenter as anyway?"


All times are GMT -5. The time now is 10:11 AM.