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

Forgive me if this has been asked/answered, but I've searched without success.

Just set-up a 12.04 machine on my home network with the objective of using it as an in-house development/staging server. I got Apache, MySQL, etc. all working perfectly, and quickly, and soon had all of the other machines on the network viewing the results, and accessing a shared folder I'd set-up on it, as well.

Trouble is, while it works great after a boot, the machine (literally) "vanishes" from the network after a short period (usually within an hour). When it does, I can't get at the Apache site(s) it's running, the Shared folder disappears, and I can't even ping it?

Now before you assume it's a dynamic IP issue, I do have my router set to give it a static IP based on its MAC address (it's a WiFi), and that works perfectly well. Even after it "disappears," it's still alive & well at (as confirmed by it's network information window).

It's just that everything stops responding at that address...?

Now I've read some posts that elude to the fact that it might be related to my not having configured Ubuntu, itself, to the static address (although that makes no sense to me, since the router is already configured for that, and Ubuntu acknowledges that's working).

As is so often the case, I find countless posts on how to correct that, and no two are the same, and as that's led to trouble for me in the past, I first wanted to see if anyone thinks that IS the problem, and if not, what else it might be?


share|improve this question
You are correct that you definitely do not need to configure it with a static address. You don't even need a static IP, actually. It may be a wifi issue. How do you access the system from another computer, by the way? – Marty Fried Aug 4 '12 at 0:37
setting a static IP at the machine rather than relying on the router for that my be more of what you are looking for – mchid Aug 2 '14 at 3:50

it's still alive & well at (as confirmed by it's network information window)

Try using ping and ifconfig as troubleshooting network.

Go to you server

open Terminal (press CTRL + ALT + T)



check the section of wlan0 or something similar since you are using wifi. If it's cable check the section of eth0 or something similar.

find the line of

inet addr:

Do you see the numbers starts from 192 ?


That's the ip of your server.

I want you to make sure you can ping to your router as well.

Open up terminal in your server


route -n

see gateway section. I assume you have as a Gateway.


If you can ping, ping to google by simply


When you successfully ping both router and google you are good to go! The above steps are very important. When you can't ping google, it indicates that name resolution is not working at all. Make sure you set DNS IP in your network settings.

If you can't ping your router, static ip is not working correctly. Make sure you set static ip in your network configuration also.

if you are using DHCP and not using static IP ,you can request new IP from DHCP server by

sudo dhclient wlan0

About your apache server, try restarting apache by

sudo /etc/init.d/apache2 restart

Go to other machines

Open up your favorite browser

type server IP in URL bar.

It works! should appears.

Good luck.

---------------Updated -------------------

Firewall setup

@ByteTraveler try ping from other machine(not from server). Do you see any response? If not, firewall might be causing a problem. Not the ideal solution, but it's okay to turn off some firewall rules ONLY for home LAN. Be sure to turn on firewall when you use Starbucks WiFi etc. Ubuntu has great firewall utility called ufw. In here, I assume you use windows samba share in your LAN. Go to your server, fire up terminal.


sudo ufw default deny
sudo ufw allow proto tcp to any port 135 from
sudo ufw allow proto udp to any port 137 from
sudo ufw allow proto udp to any port 138 from
sudo ufw allow proto tcp to any port 139 from
sudo ufw allow proto tcp to any port 445 from
sudo ufw allow 80
sudo ufw enable
sudo service ufw restart


Not Recommended turning off ALL firewall. But for temporary do...


sudo service ufw stop

to start

sudo service ufw start


share|improve this answer
thanks for getting back to me, and I apologize for taking so long to respond, but as luck would have it (wouldn't you know) it's all been working fine since my post (wouldn't you know it). – ByteTraveler Aug 15 '12 at 19:40
Today, it started again, the server 1) Stopped being visible to all the other machines on the network, 2) Stopped seeing all of the other machines on the network, but 3) Still had a perfectly fine internet connection, itself (I'm typing from the trouble machine now). ifconfig confirms its static IP of, pinging the router ( is fine, and pinging is great. To all other devices, though, it's "gone?" – ByteTraveler Aug 15 '12 at 19:45
I should add that it still sees (and communicates with) the wireless printers on the network, it's just "invisible to" other devices (Windows 7 machines & Android phones), and can't see them. Apache is still alive & well locally. – ByteTraveler Aug 15 '12 at 19:47
@ByteTraveler This might help setting up firewall in GUI. Best & The Most Secure UFW config… – linuxk Aug 24 '12 at 3:13

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.