Live data from Hacker News

Show HN: Mole – an open source tool to easily create ssh tunnels

davrodpin.github.io

51–60 of 61 posts

Re: Show HN: Mole – an open source tool to easily create ssh tunnels

#52

I'm not sure if I missed something? Normally I use -L syntax for tunneling (-L local_port:remote_addr:remote_port). Does this tool do more?

The tool can select the local port on your behalf.

It also has aliases to store configuration that user usually use, but that is comparable to the ssh config file.

Re: Show HN: Mole – an open source tool to easily create ssh tunnels

#53

I'm not sure if I missed something? Normally I use -L syntax for tunneling (-L local_port:remote_addr:remote_port). Does this tool do more?

there's multiple ways to make tunnels in ssh. -L is one of them (local forwarding). basically, local, remote and dynamic forwarding are possible. there's some interesting uses for the latter 2 as well so if you only know -L it might be nice to check out the other methods and how you can use those. You can for example, forward a remote localhost port of a server to your own localhost, and then have a fully encrypted c…

Thank you for the feedback. Much appreciated.

Someone else opened an issue requesting that: https://github.com/davrodpin/mole/issues/22

Re: Show HN: Mole – an open source tool to easily create ssh tunnels

#54

This is cool, but it's not very clear to me what is the benefit of using this over autossh. autossh detects and restarts broken tunnels and uses aliases and tidy config files: https://www.everythingcli.org/ssh-tunnelling-for-fun-and-pro...

The tool can select the local port on your behalf. One less thing to configure :)

Re: Show HN: Mole – an open source tool to easily create ssh tunnels

#55

What do you guys think of that cross-distro, Linux installation method? curl -L https://.. . | tar xz -C /usr/local/bin

This command actually fails if /usr/local/bin doesn't exist. He could simplify it by releasing the binary alone and running `curl -L --create-dirs -o /usr/local/bin/mole https://...` , but my guess is uncompressed it's huge. (edit: possible that the GitHub server would support `curl --compressed ...`, allowing the HTTP connection to compress it in transit)

That is already supported:

curl -L https://github.com/davrodpin/mole/releases/download/v0.2.0/m... | tar xz -C /usr/local/bin

And there are plans to implement a script to improve this process: https://github.com/davrodpin/mole/issues/19

Re: Show HN: Mole – an open source tool to easily create ssh tunnels

#56
post #7

Here are the example commands, with the SSH equivalent. There's a small syntax difference, but otherwise I don't think this tool adds much. $ mole -local 127.0.0.1:3306 -remote 127.0.0.1:3306 -server example@172.12.0.100 $ ssh -L3306:127.0.0.1:3306 example@172.12.0.100 $ mole -v -local 127.0.0.1:8080 -remote 172.17.0.100:80 -server user@example.com:22 -key ~/.ssh/id_rsa $ ssh -v -L8080:172.17.0.100:80 -p 22 -I ~/.ssh…

There is another interesting example:

$ mole -v -remote :80 -server example1

The missing "-local" flag will make mole to listen on a random local port.

Re: Show HN: Mole – an open source tool to easily create ssh tunnels

#57
post #49
post #40

Earlier quoted context omitted.

Well, it turns out we have different expectations regarding those tools. My brain chooses to store other things in life.

This seems to imply that he is not 'storing other things in life' because he's able to remember that L=local forwarding R=remote forwarding and D=socks proxy

The irony being that remembering that is almost guaranteedly easier than acquiring and installing mole on every machine where you may need to Port forward.

Re: Show HN: Mole – an open source tool to easily create ssh tunnels

#58

I'm not sure if I missed something? Normally I use -L syntax for tunneling (-L local_port:remote_addr:remote_port). Does this tool do more?

I don't think you missed anything.. I'm pretty sure I've seen a few similar apps like this on HN, but I don't really understand the draw of them over just using ssh's built in options.. You can even configure tunnels in ~/.ssh/config for "aliases".

Re: Show HN: Mole – an open source tool to easily create ssh tunnels

#59
post #39

Earlier quoted context omitted.

> You now bypass any corporate HTTP proxy. Assuming that said corporation isn’t blocking random ssh connections with their fancy NGFW. ;)

Yeah, this hits close to home. Our corp firewall blocks anything other than 80 and 443, and MITM's 443.

And when that proxy is worth it's salt, it shall detect attempts to tunnel plain ssh over said ports.

This is 2018, anyone who can bypass their corporate proxy with that example, should find employment elsewhere or atleast prepare to do so since your company's internals will surface on twitter any time now.

Re: Show HN: Mole – an open source tool to easily create ssh tunnels

#60

I'm not sure if I missed something? Normally I use -L syntax for tunneling (-L local_port:remote_addr:remote_port). Does this tool do more?

It can bind to a local available port without having to specify what it is. Stops port clashes.
Post reply on HN