0

So I've set up a LAMP web server on Ubuntu 14.04 server distro and installed owncloud as well as wordpress on it. It's connected to the web via ethernet and connectivity is good as far as I can tell (it can ping sites and pull in updates just fine). While I am connected to the wireless network from the router to which the server is connected (same network), I can access wordpress and owncloud just fine. However, the problem comes when I try to access it from a different network location (like from back at my apartment). The session just times out.

I checked the port forwarding (ZyXEL PK5001Z-CenturyLink router) for both port 80 and 443 as instructed by http://portforward.com/english/routers/port_forwarding/ZyXEL/PK5001Z-CenturyLink/Apache.htm. I've tried pinging each of those ports at the server's IP address with no luck.

I'm pretty new to programming and networking, so this is probably an easy fix, I just don't know where to look. Any suggestions would be greatly appreciated. The information for the server and addresses is listed below. Thank you in advance.

IP: 192.168.0.170

URL: fernweh.ddns.net "/wordpress" or "/owncloud"

dynamic ip assigned through noip.com

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ UPDATE

Okay, so I configured noip2 as suggested and still no luck. I also set up port forwarding on a couple higher ports (as suggested as well), still nothing.

I then checked to see what ports were actually open using

'nmap -v -sT local'

Which found 1000 ports, only 2 of which were not filtered

'80/tcp   http   open
 443/tcp  https  closed'

Do I need to open up more ports using

'iptables -A INPUT -p tcp --dport "port number" -j INPUT'

Or is this irrelevant?

  • 2
    It is very likely that your ISP blocks incoming connections to port 80, the default web port. Because of this, you'll have to configure your web server to listen on another port and forward that instead of 80. Leave 443 alone. – TheWanderer Oct 6 '15 at 23:55
  • 1
    ^ See that. I would stay away from anything below 2000 unless you know what you're doing. – Daniel Oct 7 '15 at 0:21
  • I also had similar problem, I read somewhere that it's a bug in my router's firmware that is not allowing to port 80. – kenn Oct 7 '15 at 8:55
1

192.168.0.170 is a private IP address which the server uses in your private LAN. It may be used by anyone, and is for that reason never routed to the internet. To access the internet, you specified your router as the default gateway. You know that already, because you enabled port-forwarding on the router.

When I ping your DDNS address fernweh.ddns.net it resolves to your internal IP

$ ping fernweh.ddns.net
PING fernweh.ddns.net (192.168.0.170) 56(84) bytes of data.

That cannot work for reasons stated above.

I suppose you're already running the NoIP client?. If yes, reconfigure it

sudo /usr/local/bin/noip2 -C

If not, download and install it like described. Since it is not good style to give a link and nothing else:

Download the source tarball to e.g your home folder and unpack

cd ~/Downloads
wget http://www.no-ip.com/client/linux/noip-duc-linux.tar.gz
tar xf noip-duc-linux.tar.gz
cd noip-2.1.9-1/

Switch to root: sudo -s and install

make install

Finally, you need to either run noip2 or make it a service so it runs at boot time. (See the README.first in the source folder)

It will compile the binaries and lead you through configuration.

Furthermore:

  • You cannot ping a port. ping works by sending ICMP packages. Unlike TCP/UDP, ICMP has no concept of a port. It might well be, that your router and/or ISP block pings to you.
  • As @Zacharee1 and @Daniel already mentioned in the comments, it may also well be, that your ISP blocks well-known ports like HTTP(S). Run your webserver an a high port. That way you also gain a very slight protection against attacks, since a full port-scan is needed to discover the running web server. Note, that this is not a sufficient security measure! Keep your WordPress and OwnCloud installations up-to-date.
  • Wow, thank you. I am running the noip client, but I haven't configured it in the way that you describe; I'll definitely try that.--- I had read about forwarding on high ports as opposed to port 80, but the instructions I had said to use it. I figured since I'm so new at this that I should follow them to start with. ---As for the "ping" bit, I knew that wasn't the right term, but when I was troubleshooting, one suggestion had me test the ports remotely or something like that...sorry about the confusion. Thanks again; I'll be sure to post the results! – Lord Julian Oct 8 '15 at 0:20

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.