2

I would like to access my Ubuntu PC remotely via SSH. The SSH daemon is currently listening on port [x]. My router is a ASUS DSL-N12E.

I have created a rule for the firewall with the following parameters:

  • Protocol: TCP
  • Direction: Downstream
  • Source Port: [x]
  • Dest IP/Mask: 192.168.1.100/255.255.255.255
  • Dest Port: [x]

and a NAT Virtual Server rule with the following parameters:

  • Protocol: TCP
  • Local IP: 192.168.1.100
  • Local Port: [x]
  • WAN IP: pppoe1
  • WAN Port: [x]

I'm able to connect to the SSH server from the local network, using ssh -p [x] myuser@192.168.1.100, but I can't do it using ssh -p [x] myuser@mypublicip. I'm guessing there's something wrong with the router configuration although canyouseeme.org says that port [x] is open.

Any ideas about what I might be doing wrong?

Delfad0r
  • 123

2 Answers2

3

This is a common issue on a lot of routers.

It sounds simply like you need to enable NAT reflection, Nat hairpin or NAT loopback, the name changes on different routers - but be warned that not all routers support it.

... Please check your firmware version, it looks like your router either didn't support it out the box, or has been buggy... I just found this, although 6 months old, it indicates a firmware fix where loopback wasn't always working. (Don't get from here - check Asus directly for even newer).

William Hilsum
  • 117,648
0

You can able to connect your machine with ssh access on local network but unable to access remotely.

you can connect through ;ocal network is because the port[x] was opened in your machine and you using local ip to access it

Please check your port forwarding setting was perfect.

Also cross check the listening port from remote ip to your public ip with telnet

telnet [remote_ip] [port_number]

Hope this helps!

BDRSuite
  • 6,378