Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm a total noob about TCP/IP, and try to set a port forwarding rule.

What I'm trying to do is this:

  • I have multiple computers connected to my router (zyxel p-660hw-t1 v2), one of them is working as Ubuntu Server
  • I want to connect that Ubuntu Server by entering my public IP, and a specific port. So I want to type (is it safe?) and get served the apache homepage
  • It has apache installed, and working, when I type from my home network. So I guess it's local IP is

Now, I'm trying to forward port 26600 to

These are my modem settings page. (They are in Turkish, couldn't figure out how to display in English, but you will recognize the keywords, and I'll try to explain)

1st: NAT -> Port Forwarding page : enter image description here

2nd: Firewall -> General

The unchecked box means "Active Firewall". So the other rules are not applying anyways, right? enter image description here

3rd: Firewall -> Rules

Activated uPnP, But I deactivated it now, it doesn't work either way.. enter image description here

4th: Advanced -> UpnP -> General enter image description here

Can you please tell me what am I doing wrong?
And I would really appreciate it if you explain your answer, to a noob :)


Or how can I identify what the problem is?

share|improve this question
Regarding the " (is it safe?)" part. Yes, as long as you keep the web server (in your case Apache) and all extra software which might be invoked froma webpage (e.g. PHP) up to date, then it should be safe. – Hennes Jul 27 '13 at 17:12
Not related to your question, but if you don't have any UPnP devices in your network, you might want to turn it off as it's considered a security risk. Actually, just turn it off. See – happy_soil Jul 27 '13 at 17:13
@happy_soil, I thought that upnp standed for "enable port forwardings" or something. Ok I'll turn it off. Thanks for both comments. And thanks Hennes for inserting the pictures in the post :) – halilpazarlama Jul 27 '13 at 18:47
and please somebody upvote me, so I can upvote all the help :) – halilpazarlama Aug 4 '13 at 15:06

It seems like you cannot forward a different port than the one setup on your server. For instance, your firmware doesn't allow forwarding port 26600 of your WAN IP to port 80 of your local machine.

You might want to change the port on which Apache serves its HTTP service before enabling the port forwarding.

  1. Open /etc/apache2/httpd.conf in a text editor. Find this line:

    Listen 80

    Change it for:

    Listen 26600
  2. Restart Apache

    sudo service httpd restart

Follow this link to learn more on how to forward ports on your router. You will forward port 26600 to 26600 to your local IP

share|improve this answer
Hi Gregory, Thanks so much for your answer. But I'm really confused here. In my router settings page. It asks me these parameters: (port to forward , ip to forward) so doesn't it work like My_WAN_IP:Port -> My_Local_IP ? I mean, the port 26600 is relevant to my router, not my PC, am I wrong ? I mean, it will forward port 26600 to my local ip, then it will choose the default port 80 inside my PC. So making Apache listen port 26600 should not change the situtation. But I will try it anyways. There is clearly somethying I don't understand.. – halilpazarlama Aug 4 '13 at 14:56
Hi Cengiz, the port 26600 is unfortunately relevant to your PC too. Some routers allow you to forward one port to another. For instance, you can sometimes make bindings to forward port 10000 of your WAN IP to port 80 of your PC's IP. In your case, your firmware only allows you to forward the very same port. If you decide you wish to access your Web server on port 26600 of your WAN IP, you must also set your PC to serve HTTP on port 26600. Then the forwarding will be from your WAN IP, port 26600, to your local PC's IP, port 26600. – Gregory A. Lussier Aug 4 '13 at 14:59
wow, I didn't know that. Ok I'm now gonna try to change Apache settings. And one more question, is it possible that my ISP is blocking some ports? Because it most probably does. And if so, what port should I choose? 26600 is something I made up. I just need one empty port. Which one should I use? I even tried port 80. I only need FTP and HTTP besides Unity MasterServer (My web application), should I chose a "standard" / "default" open port? – halilpazarlama Aug 4 '13 at 15:04
Yes, many ISPs block ports 21 (FTP), 80 (HTTP) and 443 (HTTPS) to their residential customers. They normally allow these ports only for commercial customers. Any port over 10000 should be fine. – Gregory A. Lussier Aug 4 '13 at 15:08

In answer to your question. "is it safe?" Personally i would not do it. The machine you want accessible from the outside world probably can access every other machine in your house and is also probably not dedicated just for just apache. If this machine gets compromised so could your data on this machine and others.

Spend a couple quid a month and get some shared hosting or for a little bit more a VPS.

FYI - Security is not just down to server config and security but also your web application your hosting.

share|improve this answer
Thansk! OK, but for now, there is not an application, nor data in my web server. It just shows "It Works!" default page of apache. And the reason I'm trying to do this is I want to setup a Unity MasterServer, so security is not my main concern now. When it is, I will of course rent a VPS. But I'm trying to learn how to do it myself. – halilpazarlama Jul 28 '13 at 16:34

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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