[FIXED] SSH working partly

Good evening, guys, I've recently bought this router to bypass some issues I had been experiencing on my Virgin Media Hub 3 for several years.
On my LAN/WLAN there are many machines, one macmini, one raspberry, one enigma2 satellite device, just to mention a few.
Ok, the first thing I've done has been to set up a port forwarding rule to allow SSH connections on a port different from the default 22.
This is the situation so far, just to be clear:
- From laptop (macbook Pro) to satellite decoder: OK, both on local and external connections;
- From laptop (macbook Pro) to NAS: OK, both on local and external connections;
- From laptop (macbook Pro) to macmini: OK, both on local and external connections;
- From laptop (macbook Pro) to raspberry PI: OK only on external connections, not on local ones.
Just to give you an example:
Macandy:~ alutri$ ssh -p552 192.168.0.x
ssh: connect to host xxx port 552: Connection refused
Macandy:~ alutri$ ssh -p552 username@public_ip_address
OK!
To be honest, I don't have a clue, I've used the same settings on different routers for many years with no problems.
I'm afraid it might be a router firmware bug.
Could you help me please?
I'm also posting the relevant setting from the route interface.
Thank you very much...
- Copy Link
- Subscribe
- Bookmark
- Report Inappropriate Content
So, I decided to dedicate more time to the issue.
In the end it turned out it was a problem regarding the RPi firewall configuration.
After launching the command iptables -S on the host, I recognized there was a setting blocking all the local ssh connections from my macbook pro when a specific circumstance (ICMP not reachable) was being met.
I deleted the rule this way: iptables -D f2b-sshd -s 192.168.0.17/32 -j REJECT --reject-with icmp-port-unreachable.
Now it works like a charm.
Hope this fix can help somebody else facing the same issues.
- Copy Link
- Report Inappropriate Content
For a local SSH connection to the RPi wouldn't it be: Macandy:~ alutri$ ssh -p22 192.168.0.x
and just for an external SSH connection to be Macandy:~ alutri$ ssh -p552 192.168.0.x
- Copy Link
- Report Inappropriate Content
@terziyski
Hi, pal, thanks for your reply.
As the RPi is reachable from the Internet as well, for obvious security reasons I cannot use the defaul port 22.
- Copy Link
- Report Inappropriate Content
For a local SSH access you can use the original TCP port 22. If you use TCP port 552 for external access the port-forwarding rule would look like:
If you insist to move the defualt SSH service TCP port 22 to a custom port use a port above the well know ports of 1024 (for example 8022).
- Copy Link
- Report Inappropriate Content
I've used a different port (1066 to be precise), changed the settings on both the SSH server and the router but I'm not able to login.
If I launch nmap I got contradictory responses, which I'll show now:
- Macandy:~ alutri$ nmap -p 552 192.168.0.120 -Pn
[...]
PORT STATE SERVICE
552/tcp closed deviceshare
pi@glasgy:~ $ nmap -p 552 192.168.0.120
[...]
PORT STATE SERVICE
552/tcp open deviceshare
The first command was launched from the laptop (macbook pro), the second one once logged in in the RPi host.
- Copy Link
- Report Inappropriate Content
How about the standard SSH service 22 TCP port. Does this work when the RPi SSH service port is back on 22 TCP ?
- Copy Link
- Report Inappropriate Content
@terziyski
If I switch to port 22 the connection times out: no reply at all.
- Copy Link
- Report Inappropriate Content
This sounds weird. If your RPi SSH service is on its standard port 22 TCP, you should be able to access it locally from your laptop (wired or wireless).
All MR600 client connections (wired or wireless) should be bridged, so there should be no reaason for time out when connecting to RPi from your laptop.
Did you configure any Service filtering on your MR600:
If that's not the case, then most probably this issue is connected with the IP address reservation record for RPi.
I see that you have it with several different IP addresses - 192.168.0.120, 192.168.0.121 (in port-forwarding table) and 192.168.0.116 (as IP address reservation) in your other thread.
When configuring IP address reservation make sure that the reserved IP addresses are within the MR600 LAN DHCP server pool.
- Copy Link
- Report Inappropriate Content
@terziyski
First of all, I'd like to thank you for all your help you're providing.
No, no filtering service is off; unfortunately the biggest problem I'm experiencing with this router is not about the SSH connection, but the IP reservation.
All these issues don't make any sense to me, to be honest I think the firmware is buggy.
It would be great to try a beta and see how it behaves.
Just to sum things up, the only "strange" thing I've done after my purchase was to upgrade the firmware before starting the configuration, but upgrading a firmware should be a good practice not the origin of all problems.
I'm thinking about returning the item.
- Copy Link
- Report Inappropriate Content
So, I decided to dedicate more time to the issue.
In the end it turned out it was a problem regarding the RPi firewall configuration.
After launching the command iptables -S on the host, I recognized there was a setting blocking all the local ssh connections from my macbook pro when a specific circumstance (ICMP not reachable) was being met.
I deleted the rule this way: iptables -D f2b-sshd -s 192.168.0.17/32 -j REJECT --reject-with icmp-port-unreachable.
Now it works like a charm.
Hope this fix can help somebody else facing the same issues.
- Copy Link
- Report Inappropriate Content

Information
Helpful: 0
Views: 139
Replies: 9
Voters 0
No one has voted for it yet.