Community discussions

MikroTik App
 
NorthAntrim
just joined
Topic Author
Posts: 15
Joined: Sat Jan 25, 2014 3:31 pm

Cannot SSH to device on LAN from WAN

Sun Jan 26, 2014 1:12 pm

I'm not the most experienced (I'm learning), and I thought I had everything set in place for SSHing into a device on the LAN, but when I try to SSH in from the WAN I SSH into the router and not the device on the WAN.

My RB is behind a modem and is connected to the Internet via PPPoE.

Here are my NAT rules:
[admin@MikroTik] /ip firewall nat> print 
Flags: X - disabled, I - invalid, D - dynamic 
 0   ;;; default configuration
     chain=srcnat action=masquerade out-interface=(unknown) 

 1   chain=srcnat action=masquerade out-interface=pppoe-out1 

 2   chain=dstnat action=dst-nat to-addresses=192.168.1.64 to-ports=22 protocol=tcp in-interface=Internet dst-port=22
192.168.1.64 is the device I'm trying to access from the WAN. I can access it fine via SSH on the LAN.

The device is also running Apache, and when I replaced ports 22 with 80 in the NAT rules to test that, I still get the router's login page from the WAN.

I'm not sure what I'm doing wrong, but if someone could point me in the right direction, that'd be a great help.

Thanks! :D
 
NorthAntrim
just joined
Topic Author
Posts: 15
Joined: Sat Jan 25, 2014 3:31 pm

Re: Cannot SSH to device on LAN from WAN

Mon Jan 27, 2014 9:36 am

I was able to solve the issue by changing the in interface from "internet" to "pppoe-out1".

Who is online

Users browsing this forum: Bing [Bot], Google [Bot] and 88 guests