0

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 192.168.1.115 (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?

Thanks

2
  • 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? Aug 4, 2012 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, 2014 at 3:50

1 Answer 1

1

it's still alive & well at 192.168.1.115 (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)

type

ifconfig 

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 ?

Ex 192.168.1.115

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

type

route -n

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

ping 192.168.1.1

If you can ping, ping to google by simply

ping google.com

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 192.168.1.115 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.

code:

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

or

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

code:

sudo service ufw stop

to start

sudo service ufw start

Source http://ubuntuforums.org/showthread.php?t=806000

4
  • 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). Aug 15, 2012 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 192.168.1.115, pinging the router (192.168.1.1) is fine, and pinging Google.com is great. To all other devices, though, it's "gone?" Aug 15, 2012 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. Aug 15, 2012 at 19:47
  • @ByteTraveler This might help setting up firewall in GUI. ubuntuforums.org/showthread.php?t=806000 Best & The Most Secure UFW config askubuntu.com/questions/178925/…
    – linuxk
    Aug 24, 2012 at 3:13

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .