Community discussions

MikroTik App
 
Samiojtm1
just joined
Topic Author
Posts: 1
Joined: Mon Sep 11, 2023 5:37 am

I can't connect via ssh to routeros

Mon Sep 11, 2023 6:14 am

My ip address in routeros is local and it is different from public ip. How do I make a nat so that I can have ssh connection?

Public ip : 188.64.14.37

Local ip : 172.17.0.2

Port : 22
 
IlKa
newbie
Posts: 38
Joined: Sun Jan 03, 2021 11:42 pm

Re: I can't connect via ssh to routeros

Mon Sep 11, 2023 6:23 pm

Your public IP is Ubuntu Linux and your network structure is unclear. Where does sit MT? Could you draw a map?
If it sits behind Ubuntu, you would need to do NAT there
 
User avatar
Larsa
Forum Guru
Forum Guru
Posts: 1702
Joined: Sat Aug 29, 2015 7:40 pm
Location: The North Pole, Santa's Workshop

Re: I can't connect via ssh to routeros

Mon Sep 11, 2023 6:29 pm

@Samiojtm1, never ever open services like ssh for public access from internet. Instead use VPN to access your local network.

Here are som usefull user guides courtesy of @Anav:

- Beginner Basics
- The DEFACTO DEFAULT FIREWALL Setup
- New User Pathway To Config Success
- Wireguard Success For The Beginner [VPN]
 
User avatar
anav
Forum Guru
Forum Guru
Posts: 22371
Joined: Sun Feb 18, 2018 11:28 pm
Location: Nova Scotia, Canada
Contact:

Re: I can't connect via ssh to routeros

Mon Sep 11, 2023 7:31 pm

To clarify, what LARSA is saying, I THINK, is dont setup an SSH server on your LAN.
If you need to access the Router for config purposes or access LAN IPs, then wireguard VPN is an excellent solution.
You can also SSH into the router itself for access but I would use this a backup only.

Also never use default port .................2232 or something else etc........