Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

Ok.. First off my ISP does not block ports. I run web server just fine from another machine. I have port forwarded port 22. I can access within network but not out of.. I.E. my android. I get "The Operation Timed Out" on ConnectBot.

Oh and I have allowed 22 on UFW.

To answer what exactly happened was my ISP blocks port 22, even though a while back they told me they do not block any ports.. I changed it to port 27 and it worked without a problem.

share|improve this question
    
Does sudo tcpdump -i eth0 tcp port 22 show anything when you try to connect? tcpdump basically dumps all packets that are received on your ethernet port. The one above filters for incoming ssh traffic. If tcpdump doesn't show your traffic, then the problem is not with your PC. –  jippie Apr 17 '12 at 21:40
    
no it shows nothing at all. To make sure it was working right i connected within the network and it showed a huge list. So no its not showing anything when i'm trying from my android. Does that mean router? I have contacted my ISP before and they said they do not block any ports. –  alexander7567 Apr 17 '12 at 21:46
    
There is no lower level to view than with tcpdump. If tcpdump doesn't show packets, they're not on the network cable. –  jippie Apr 18 '12 at 7:10

2 Answers 2

up vote 2 down vote accepted

so you have your network router configured to forward connections on port 22 to your machine's static IP address.

when trying to connect from your android (cell network); do you use a terminal emulator? is so add additional flags to the connection command : " ssh -vv " should show more verbose information to see at what point it denies you.

If it doesn't reach the service "sshd" I would purge openssh-server and re-install. This will automatically configure correctly UFW if there's any error with your firewall.

share|improve this answer
    
Yes it is configured. I have run web servers under windows for years and had no trouble port forwarding until ssh. Well I don't have a rooted phone at the moment so i cannot use a terminal emulator. You need root access for ssh. –  alexander7567 Apr 17 '12 at 22:11
    
by default when you install openssh-server you don't need to manually configure ufw it does it automatically for you. I would try connecting to your server from outside your network using another computer to isolate the problem. I would also look into your /etc/hosts.allow and /etc/hosts.allow files. These files determine who could connect to your system, these should be black by default but it won't hurt to check. –  user55409 Apr 17 '12 at 22:25
    
Both of those files are all commented out. I'm assuming you meant BLANKED and not blacked. I have connected to SSH servers from my phone and i have no trouble accessing my web server from my phone so i wouldn't think my phone would be the issue. (I really have no way to test it for a while.) –  alexander7567 Apr 17 '12 at 23:07
    
Would there maybe be a setting in my /etc/ssh/sshd_config? –  alexander7567 Apr 17 '12 at 23:12

This could actually be the network router itself reserving port 22 for administrating itself. It makes sense if it worked when changing the port to 27. What kind of router do you have?

share|improve this answer
    
Its a weird kind.. Its called axesstel. And that would make since because they can tell me what kind of signal I am picking up and everything. –  alexander7567 Oct 25 '12 at 2:10

Your Answer

 
discard

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.