Find the answer to your Linux question:
Results 1 to 4 of 4
Hello all, I am trying to set my new Apache server which is running in my internal network using NAT and port forwarding. Since default port 80 is taken by ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    srj
    srj is offline
    Just Joined! srj's Avatar
    Join Date
    Jan 2012
    Location
    Bucharest
    Posts
    86

    Apache running on other ports


    Hello all,

    I am trying to set my new Apache server which is running in my internal network using NAT and port forwarding.

    Since default port 80 is taken by my router configuration webpage I tried to set Apache to listen to other ports but It's not working when accessed from the external IP.

    I am really confused cause if a run a port test from 'http://www.yougetsignal.com' all the ports I enable in apache configuration file are open but trying the website www.domain:new_port is returning the 'Unable to connect' error.

    If for example I close the Apache server 'http://www.yougetsignal.com' can't see the 'new_port' open.

    So:

    1. Accesing the Apache server by it's internal IP address (not public) is returning the test page successfully on all enabled ports.
    2. Doing the same from the external IP (domain name:new_port) is not working. (unable to connect)
    3. All the mentioned ports are forwarded from the router's configuration.
    4. While the server is running, ports are open from the Internet's perpective. (closing the server will close the ports).
    5. If I simply go to "www.domain.com" the router's configuration website is shown (can't find a way to change the port for this page)

    I have no idea what I'm missing.
    If the ports are enabled for external access and the IP and domain name are routing packets successfully (to my computer) what do you think happened? Did anyone had the same issue before?

    Thank you very much in advance for your help as always,
    Sergiu

  2. #2
    srj
    srj is offline
    Just Joined! srj's Avatar
    Join Date
    Jan 2012
    Location
    Bucharest
    Posts
    86
    I actually asked a friend of mine to access it from outside my network and it's working for both scenarios:

    1. www.domain.com
    2. www.domain.com:4444

    So I guess It's all OK but I still don't understand why I can't do it from inside the network with the external IP.

    Glad it's solved though.

  3. #3
    Linux Newbie
    Join Date
    Nov 2009
    Posts
    223
    srj.

    Sounds to me that you do not have "NAT Loopback" switched on.

    NAT Loopback allows you to access internet-facing ports from inside the router. Check if your router supports NAT Loopback. If so, enable it.

    If not you have a couple of choices.

    I assume that the domains you mention are DNS-Resolvable somewhere (DynDNS, afraid.org etc). Your choices are do you want to use the domain name within your private network. If so, pop an entry to /etc/hosts resolving it to the inside network address.

    If not, then access it as you have been doing in your testing.

    Cheers - VP

  4. #4
    srj
    srj is offline
    Just Joined! srj's Avatar
    Join Date
    Jan 2012
    Location
    Bucharest
    Posts
    86
    Thank you very much for your reply.

    Initially I thought people trying to access the server from outside had the same issue and now I was waiting to find out why this happened.

    Voidpointer69 your reply answered my question perfectly. Thank you again for your reply. I'll edit the hosts file since I don't have a "NAT loopback" option in my router.

    Cheers,
    Sergiu

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •