2

I set up an a Ubuntu Server with LAMP and am trying to access it externally.

What I did:

  • I set up an account at no-ip.com following this article

  • I gave the server a local static ip of 192.168.1.127 and forwarded the port 80 and 22 (both externally and locally) to that ip adress. I also forwarded port 50005 external to port 80 internal.

  • I found my external ip via Portcheckers. To my understanding, the external ip is the same for all computers and routers on my network.

    The problem

  • I check ports 80, 22 and 50005 with portcheckers and all of them (along with all other major ports) were said to be unavailable.

  • I also tried to ping my server's external ip from portcheckers and got Ping Failed: TimedOut I tried pinging the ip address from the terminal, but it froze after PING myhost.no-ip.org (66.XXX.XXX.XX) 56(84) bytes of data. When I tried to connect to the sever though my browser I got the Oops! Google Chrome could not connect to... message.

    Info

    I can connect to my server locally(192.168.1.127) through ssh, sftp, and http.

    I have a Linksys E320 router, and I disabled the firewall.

    Please let me know if I need to provide my external ip. Thanks for the help.

    EDIT

    I modified /etc/apache2/ports.conf to listen to port 50005 instead of 80 by replacing Listen 80 with listen 50005

  • 19
    • You should generally never disable your firewall. First get pings and such to work using IP address, then figure out DNS issues. Be sure you are checking your public IP address using a source outside of the local network (portcheckers is fine). Set up port forwarding on an unused port (e.g. 63242) and set up the web server to serve on that port, then test. It's possible your ISP blocks inbound traffic on popular ports. Also, check if UFW is running and what ports it is blocking with sudo ufw status.
      – Paul
      Commented Jul 7, 2014 at 0:36
    • Have you tried using the No-IP update tool? From memory they refer to it as DUC. Commented Jul 7, 2014 at 4:23
    • @MichaelFrank I thought the update tools were only used if the server has a dynamic local ip address Commented Jul 7, 2014 at 4:33
    • @Paul I only disabled the firewall to troubleshoot. Relatedly, ufw is disabled. Do you have any suggestions as to how I could get pings and such to work using IP address? All the ports I scanned were unavailable and a port 80 redirect failed. I would assume that my main problem is that I can't externally ping my ip address Commented Jul 7, 2014 at 4:39
    • @TAAPSogeking No, the tool is designed to keep your domain name in sync with your dynamically changing external IP. Commented Jul 7, 2014 at 4:41

    1 Answer 1

    0

    WHY I AM WRONG

    I say that the reason you can't ping is: the router never forwards the echo request to your server, but that doesn't explain why the router itself doesn't reply to the echo request. On my home network, I can ping my router directly (192.168.1.254), so why is it that when I try to ping it externally it doesn't work?

    My best guess

    I'm still learning this, so this info may not be accurate. I largely got my answer from https://community.spiceworks.com/topic/85353-forward-pings-from-the-router-to-the-server-behind-it

    You're inability to ping isn't really your fault, but really the fault of the limited design of IPv4. I'm assuming your router has a designated IP address, and you have it set up to forward the ports 80, 22, and 50005 to some computer of your choosing; This is your router using Port Address Translation (PAT), which is a particular type of Network Address Translation (NAT).

    When you ping a server, ping transmits an Internet Control Message Protocol (ICMP) Echo Request message and waits for a return message.

    The problem is that ICMP is so low level that it doesn't have ports. So your router is not forwarding the ICMP echo requests to your server, because your router is only forwarding ports, hence no ping.

    Instead of using ping to check if your server is up and running, you might be able to do a workaround with telnet 25. I haven't set that up on my server yet so I'm not sure how to do that.

    I got it to work? Instead of doing port forwarding, I went to Firewall > IP Passthrough, and I changed my allocation mode from "Passthrough" to "Default Server", and I set the default server as the internal IP that my laptop server is using (192.168.1.99).

    Now ping works. I'm honestly not sure if my situation is anything like your situation, so I hope to get a reply from you soon.

    You must log in to answer this question.

    Not the answer you're looking for? Browse other questions tagged .