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

Since I've had a laptop (A), I've been trying to connect it with my Desktop PC (B) via router in a LAN, problem is (B) won't even answer any request aside from a ping. I've tried ssh, ftp, vnc, samba, vpn and in each case, (A) won't be able to reach (B) but (B) is able to reach (A)'s severs just fine. I've also tested this with an android device (C) and again (B)=>(C) but (C)=/=>(B).

A note on samba, I don't know if it's supposed to be a stable protocol but it's kind of the exception, it doesn't always connect (B) to (A) either. Another thing is sometimes samba via nautilus sees there is a (B) machine but is always unable to mount it...

I've tried a test of another post on the subject: booting (B) via a Live CD. There everything works, from ftp to ssh and samba or vnc. So I followed another of his advices and tried to figure out if I (B) has a firewall. So far nothing seems to indicate it since by default there's none, I don't remember installing any and I checked my installed software for one.

My questions would be: 1. how can I be sure I don't have a firewall or any other type block, I can give you other details like iptables --list output (no idea what that is though). 2. If you don't think it's that, what in hell could it be, I used to fault the ethernet of my MB but now I know it's the drivers at most. Looks to be software now and that gives me hope again.

I'll be checking this post to give you anything you need to answer. Thanks for your help.

share|improve this question
up vote 2 down vote accepted

The first thing to do is ensure that all of these services are running. I'm pretty familiar with debugging SSH so I'll use this as an example; but the same would apply to any protocol.

1 - check the service is running. It's obvious, but sometimes things don't start, for whatever reason. Run sudo service ssh start to ensure the service is running.

2 - check there's no firewall active (or that SSH access is allowed). If you're running on a desktop installation there's no firewall installed by default (as Ubuntu doesn't ship with any network-listening services enabled by default), but if there is (or if you're using ubuntu server), check the status of the firewall by using sudo ufw status (viewing the status of the firewall needs root access).

3 - see what another machine sees. Use a portscanning utility, such as nmap to make sure that the services are running and listening. nmap [IP address] will portscan the given IP and tell you what services are running. Note - you should run this from another machine to be sure that you're seeing what's actually accessible.

From this you'll be able to figure out where the trouble is being caused.

share|improve this answer
Your firewall tool advice is what saved my life man, you're now officially my hero. I think I installed it when I just got from Win7 to Ubuntu 11.10, stupidly thought I NEED a firewall and completely forgot about ufw. So thanks a lot, I disabled it and now ALL IS PERFECT. – sinekonata Nov 4 '12 at 1:59
EDIT: I guess ufw makes little sense for normal use but if it's actually nice to have, just tell me I'll try to allow exceptions or something. And thanks again, how did you know it was uwf and not some other firewall btw? – sinekonata Nov 4 '12 at 2:03
Cheers man :D I didn't know it was ufw specifically, but since all the services were failing it was probably a firewall issue, and ufw is one of the most popular choices because it's so powerful (as it's a frontend to IPtables) and so easy to use :) In terms of needing it - it depends on your use. I like to have a firewall on and use exceptions because it makes it harder for tools like nmap to detect what OS you're running. Of course, this doesn't stop a determined attacker but it stops a few script kiddies :) Then again I don't have many services running so it's not crucial for me :) – jackweirdy Nov 4 '12 at 17:32

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.