1

When I try to connect to the public external ssh Server bandit.labs.overthewire.org via:

sudo ssh [email protected] -p 2220

I get the error message:

ssh: connect to host bandit.labs.overthewire.org port 2220: Connection refused

specs:
My OS:4.13.0-37-generic #42~16.04.1-Ubuntu 64 Bit

My (homenetwork) router: Fritzbox7272

What I've already tried and figured out:

-connecting via browser web ssh -> works fine

-connecting with VPN enabled -> works fine

-connecting to a local ssh server hosted on a virtual machine on my pc (local vmware network) -> works fine

-watching Wireshark while faling to connect

-> I'm sending a tcp packet to the server with syn flag set, I'm receiving a tcp packet from the server with a set ack and rst flag

-> the outgoing ports from my request vary from request to request, but I think thats normal

-modify iptables via:

sudo iptables -A OUTPUT -p tcp -d 176.9.9.172 -j ACCEPT

to allow all outgoing traffic to the server (the ip is correct)

-disable my firewall software

Any ideas why I still can't connect to the server (without using VPN or webssh)?

I think it might be an issue with my router, what could it be and how may I solve it?

5
  • Why are you rying to connect on port 2220? SSH is typically (but not always) bound to port 22.
    – davidgo
    Commented Mar 23, 2018 at 22:17
  • I know, but the server is set up on that port. I connected successfully on that port via VPN and webssh as well. Commented Mar 24, 2018 at 0:09
  • is the server logging erros? Commented Mar 24, 2018 at 5:44
  • have you tried bypassing the router and plugging into the modem? Commented Mar 24, 2018 at 5:48
  • I have not tried bypassing the router, but that sounds like a good idea to me, I'll try that. I only have very limited access to the server, since its not mine, so i can't check the logfiles on the server, if that's what you meant. If I am supposed to find ssh logs on my client machine, than I have no idea where to find these logs and I couldn't find anything about client ssh logs on the internet. Commented Mar 25, 2018 at 0:13

1 Answer 1

0

It could be your router or even your ISP blocking the port (not sure why), have you tried changing the port used on the server? (would be a comment but can't yet).

You could set up port forwarding on your router to send ports coming from 2220 to your computer but if it's your ISP, then there's not much you could do other than try another port or go over VPN

2
  • The server also hosts a webserver, I can connect to it (no VPN). Commented Mar 24, 2018 at 23:59
  • I also scanned the server with nmap (its a testserver for hacking purposes, so there is no problem with that), and got some answers from services I tried to speak with via netcat (no VPN enabled).I also performed the same scan of the server again, but with VPN enabled (nmap -sT 176.9.9.172) and I found different services on different ports, than in my first scan, which is kinda odd in my opinion.I dont see that port forwarding would help tbh, but i will try. Commented Mar 25, 2018 at 0:05

You must log in to answer this question.

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