Ssh access on WAN interface failing

I'm trying to acess my router from the wan interface. I started with the default setup, which I see in luci is Interface "Unspecified". That failed. I then created two instances, one wan and one lan. It still fails.

My netstat looks like as follows. Note that the owrt router is running as a router behind a router. The router connected to the ISP offers IP's in the 192.168.10.x range. The owrt router gets the IP 192.168.10.4 from that, and offers IP's in the 192.168.1.x range.

netstat -t -l -n | grep :22
tcp   0   0   192.168.1.1:22       0.0.0.0:*     LISTEN
tcp   0   0   192.168.10.4:22     0.0.0.0:*     LISTEN
tcp   0   0   fdd8:xxxx:xxxx::x:xx   :::*          LISTEN

From my machine at 192.168.10.2, when I try to ssh to the owrt router, I get:

$ ssh root@192.168.10.4
ssh: connect to host 192.168.10.4 port 22: Connection refused

Nmap tells me all ports are closed:

$ sudo nmap -T4 192.168.10.4
Starting Nmap 7.80 ( https://nmap.org ) at 2023-01-08 01:53 PST
Nmap scan report for 192.168.10.4
Host is up (0.00043s latency).
All 1000 scanned ports on 192.168.10.4 are closed
MAC Address: 60:22:32:3E:3B:BB (Unknown)

Nmap done: 1 IP address (1 host up) scanned in 43.55 seconds

Dropbear config looks like:

config dropbear
      option PasswordAuth 'on'
      option Port '22'
      option Interface 'wan'

config dropbear
      option PasswordAuth 'on'
      option Port '22'
      option Interface 'lan'

How can I fix this?

You need to open the access on the firewall with a rule.
However you need to be careful, as the dropbear is a lightweight ssh daemon and it is not a good idea to expose it to the internet. Better to use a vpn.

1 Like

Ah, ok. Many thanks!

This was my frist step, but next I intended to look into wireguard. Maybe I should just cut ot the chase.

1 Like

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.