Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

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 am using Ubuntu 12.04 with KDE desktop. I have installed apache2 on my pc. I want set my localhost as remote accessible server. What I must to do? What is the NAT or Ubuntu servers settings?

share|improve this question
up vote 1 down vote accepted

You need to do the following things for Making Localhost as worldwide server

1.Check if you router support DDNS ( most router do )

enter image description here

2.Make an account on supported DDNS site ( for example you have made )

3.Sign in with the user name and password ( as you can see in above in i have supported

4.Then simply DMZ to you computer if address ( ifconfig i have )

enter image description here

When some one paste in web browser it will pointing to you Localhost worldwide server

share|improve this answer

You will need to access your routers administration page and forward whatever port Apache is running on to your PC's IP( usually 80 ). To access your router its usually unless you have edited the IP or have another form of setup, if you do your probably wont need this advice.

You will also need to use ufw to allow port 80 inbound and outbound from your PC.

sudo ufw enable
sudo ufw allow 80/tcp

Those will allow access to you web server if you have your firewall up as you should.

Also suggest if your opening it up to the net to do some hardening of the web server before hand. Have a look at HERE

share|improve this answer

I asume your server is behind a (home/NAT)router? If this is the case all you need to this is forward port 80 to your PC on the router. You can find how to do this here on

In default Apache is remotely accessible if there is no active firewall present.

share|improve this answer

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.