Community discussions

MikroTik App
 
network99
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 90
Joined: Wed Nov 22, 2017 8:47 pm

ssh tunnel with putty and MikroTik doesnt work

Wed Aug 18, 2021 10:54 am

hello guys
good time

I want to run ssh tunnel with putty and MikroTk (for test only)
I configured that explained there : http://www.dotcomunderground.com/blogs/ ... o-hide-ip/
but not working !

what things I should config on MikroTik ?
for example need to config socks5 or need to config web-proxy ? or need to write NAT ?
can you help me ?
 
ConnyMercier
Forum Veteran
Forum Veteran
Posts: 725
Joined: Tue Dec 17, 2019 1:08 pm

Re: ssh tunnel with putty and MikroTik doesnt work

Wed Aug 18, 2021 11:17 am

Good Morning,

Please send us the Config-File (/export hide-sensitive file=somefilename)
 
sindy
Forum Guru
Forum Guru
Posts: 10206
Joined: Mon Dec 04, 2017 9:19 pm

Re: ssh tunnel with putty and MikroTik doesnt work

Wed Aug 18, 2021 11:29 am

By default, SSH tunneling is disabled in RouterOS (and so it is in many, if not all, contemporary linux distributions). Hence /ip ssh set forwarding-enabled=local should be the only thing you need to change.

EDIT: sorry, I didn't read the page you've posted till the end. For dynamically created port forwardings, you need to set forwarding-enabled to both.
 
network99
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 90
Joined: Wed Nov 22, 2017 8:47 pm

Re: ssh tunnel with putty and MikroTik doesnt work

Wed Aug 18, 2021 11:42 am

Good Morning,

Please send us the Config-File (/export hide-sensitive file=somefilename)
thank you for your attentions
[user@router] > ip ssh print 
                forwarding-enabled: both
                always-allow-password-login: no
                strong-crypto: no
                allow-none-crypto: no
                host-key-size: 2048

[user@router] /ip socks> print 
                enabled: no
                port: 1080
  		connection-idle-timeout: 2m
                max-connections: 200
                version: 4
                auth-method: none


[user@router] /ip settings> print 
               ip-forward: yes
               send-redirects: yes
               accept-source-route: no
               accept-redirects: no
               secure-redirects: yes
               rp-filter: no
               tcp-syncookies: no
               max-neighbor-entries: 8192
               arp-timeout: 30s
               icmp-rate-limit: 10
               icmp-rate-mask: 0x1818
               route-cache: yes
               allow-fast-path: yes
               ipv4-fast-path-active: no
               ipv4-fast-path-packets: 0
               ipv4-fast-path-bytes: 0
               ipv4-fasttrack-active: no
               ipv4-fasttrack-packets: 0
               ipv4-fasttrack-bytes: 0

[user@router] /ip firewall nat> print 
                ;;; NAT Internet
                chain=srcnat action=masquerade out-interface=ether4 log=no log-prefix="" 


 
network99
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 90
Joined: Wed Nov 22, 2017 8:47 pm

Re: ssh tunnel with putty and MikroTik doesnt work

Wed Aug 18, 2021 11:44 am

By default, SSH tunneling is disabled in RouterOS (and so it is in many, if not all, contemporary linux distributions). Hence /ip ssh set forwarding-enabled=local should be the only thing you need to change.

EDIT: sorry, I didn't read the page you've posted till the end. For dynamically created port forwardings, you need to set forwarding-enabled to both.

thank you gazillion
yes I actived that ! but it doesnt work

[user@router] > ip ssh print 
                forwarding-enabled: both
                always-allow-password-login: no
                strong-crypto: no
                allow-none-crypto: no
                host-key-size: 2048
 
sindy
Forum Guru
Forum Guru
Posts: 10206
Joined: Mon Dec 04, 2017 9:19 pm

Re: ssh tunnel with putty and MikroTik doesnt work

Wed Aug 18, 2021 11:51 am

OK, in that case, go step by step.

Use just "local" forwarding (instead of "dynamic" one) in Putty tunneling settings, where you'll forward a local port 8443 to a single remote socket (ip.add.re.ss:443) representing some https web page you can normally access, and disable the proxy in the browser. Then, put "http://localhost:8443" into the address page of the browser. If you get the web page, or at least some immediate error response (i.e. not a timeout), the tunneling as such works.

Another thing - while the "change settings" window is open in Putty, tunneling doesn't work at all.
 
network99
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 90
Joined: Wed Nov 22, 2017 8:47 pm

Re: ssh tunnel with putty and MikroTik doesnt work

Wed Aug 18, 2021 12:02 pm

thanks all freinds

my problem solved !
problem was mozilla firfox settings :D

thanks
 
network99
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 90
Joined: Wed Nov 22, 2017 8:47 pm

Re: ssh tunnel with putty and MikroTik doesnt work

Wed Aug 18, 2021 12:09 pm

I want to use static and one port (not dynamic)

what I should do ?
 
sindy
Forum Guru
Forum Guru
Posts: 10206
Joined: Mon Dec 04, 2017 9:19 pm

Re: ssh tunnel with putty and MikroTik doesnt work

Wed Aug 18, 2021 12:31 pm

That's what I've described as an intermediate step above - no proxy in the browser etc.

Who is online

Users browsing this forum: markinhusxp, sjdurand and 210 guests