Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free.

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

CC-02 kernel

[  399.656733] [UFW BLOCK] IN=eth0 OUT= MAC= SRC= DST= LEN=60 TOS=0x00 PREC=0x00 TTL=64 ID=14158 DF PROTO=TCP SPT=47368 DPT=22 WINDOW=5840 RES=0x00 SYN URGP=0

The output from sudo ufw status verbose

Status: active  
Logging: on (low)  
Default: deny (incoming), allow (outgoing)  
New profiles: skip  

To                         Action      From  
--                         ------      ----  
Anywhere                   ALLOW IN 137,138/udp (Samba)  
Anywhere                   ALLOW IN 139,445/tcp (Samba)  
22                         ALLOW IN  

I am trying to ssh to CC-02 using ssh server@CC-02 but I get "Could not resolve host name". But replacing CC-02 with the ip address works fine. I have checked /etc/hosts and /etc/hostname and I have them configured properly. I don't exactly know what the log really means. Do I need to open another port?

share|improve this question
up vote 2 down vote accepted

Your rules look fine for ssh, but I think you have some name resolution problems, as proven by it working if you use the IP address. You say that your hosts file, etc is set up correctly. is that on the target machine or the source? The source machine needs to be able to get the target machines name ... a good way of doing this is by enabling DHCP on your router. If you want to verify that this is the problem, manually put an entry in your hosts file on the source machine.

the strange part is that the log does say the port is blocked ... from what I can see (and from the output of my own UFW status) it should be fine.

share|improve this answer
I missed the part of manually putting an entry to my client's hosts file. It's now recognized. – user2814 Oct 19 '10 at 5:34

You must configure your rules for default forward policy. They are in /etc/default/ufw.

Edit with gedit (as super user) with the command:

 sudo gedit /etc/default/ufw

once into, change the line:




save and exit

Last, reload the ufw with (as super user again):

sudo service ufw restart

This worked for me!!!

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.