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?


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.

  • 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!!!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy