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?
You need to do the following things for Making Localhost as worldwide server
1.Check if you router support DDNS ( most router do )
2.Make an account on supported DDNS site ( for example you have made abcz.np-ip.org )
3.Sign in with the user name and password ( as you can see in above in i have supported http://no-ip.com
4.Then simply DMZ to you computer if address ( ifconfig i have 192.168.1.2 )
When some one paste abcz.np-ip.org in web browser it will pointing to you Localhost worldwide server
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 192.168.1.254 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.
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
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 portforward[dot]com
In default Apache is remotely accessible if there is no active firewall present.