Community discussions

MikroTik App
 
kenth
just joined
Topic Author
Posts: 18
Joined: Sun Oct 05, 2014 8:17 am

Proxy traffic through a SSH tunnel? (SOCKS proxy)

Fri Jul 22, 2016 9:12 pm

Can Mikrotik proxy traffic over a SSH tunnel? In Linux I can do 


# ssh -D port_no ip_address

And then in e.g. Firefox enable SOCKS proxy at localhost:port_no.
 
guipoletto
Member Candidate
Member Candidate
Posts: 195
Joined: Mon Sep 19, 2011 5:31 am

Re: Proxy traffic through a SSH tunnel? (SOCKS proxy)

Thu May 11, 2017 11:16 pm

I'm trying to do just that, but with no success for now.

I can tunnel specific ports just fine, like tunnelling local port 8010 to remote 10.0.0.10:80, works fine, but i have to remember all the mappings in this rat's nest...
So i went on looking for a more friendly solution, and i was presented to the concept of dynamic mapping and proxying with cocks v5.

I setup putty with option D8080, and firefox proxy settings 127.0.0.1:8080 with socks v5. But i can not get it to work.

Does someone has a similar setup running and could chime in with some advice?


Thanks!
 
Sob
Forum Guru
Forum Guru
Posts: 9121
Joined: Mon Apr 20, 2009 9:11 pm

Re: Proxy traffic through a SSH tunnel? (SOCKS proxy)

Fri May 12, 2017 4:26 am

I just tried a quick test and it worked, nothing special was required. I did the same thing you did, only with different port. The SOCKS5 part is done by client, so it should just work.
 
agiz10
just joined
Posts: 8
Joined: Sun Jun 10, 2012 8:45 pm

Re: Proxy traffic through a SSH tunnel? (SOCKS proxy)

Tue Nov 05, 2019 3:44 pm

To avoid opening new thread, i will use this one.

SOCKS proxy works, but sometimes (somewhat often) it stops working. It seems it hangs on TLS handshake with remote sites. I could not find anything regarding this, but the closest i could find is this report. In short: "there is a short-timeout bug of some kind in OpenSSH itself":
https://askubuntu.com/questions/786897/ ... untu-16-04

When i connect with Putty to Linux (Ubuntu - ssh SOCKS proxy tunnel) machine, it works without any problems, so there is most likely some problem with MikroTik ssh implementation..
I thought i should share this if others have problem. Would be good if someone else could confirm my findings.

Regards,
 
hulitolku
just joined
Posts: 4
Joined: Wed Nov 21, 2018 1:57 am

Re: Proxy traffic through a SSH tunnel? (SOCKS proxy)

Thu Aug 20, 2020 2:06 am

Which command can replace parameter "-D" on New Treminal in Microtik?
 
simmorsal
just joined
Posts: 1
Joined: Tue Feb 07, 2023 6:39 pm

Re: Proxy traffic through a SSH tunnel? (SOCKS proxy)

Fri Feb 17, 2023 2:10 pm

Which command can replace parameter "-D" on New Treminal in Microtik?
Everywhere on the internet people know how to easily set this up easily, yet no one answers this question!

Who is online

Users browsing this forum: dsfak, martidim, plastilin, tdw and 221 guests