News for hackers. Stuff that matters.
Re:SSH hacks – a little sanity for remote workers by InvaderFizz on Thursday April 30, 2020 @12:27AM (#23027447)
Another lesser known tunneling trick is that SSH will happily act as a SOCKS5 Proxy. I've been using this trick for going on 20 years now.

Just do: ssh -D9090 user@remote

Then, in Firefox, set it to use a SOCK5 proxy of localhost:9090 and "Proxy DNS when using SOCKS v5".

Now, when you use Firefox it is as if you are using Firefox on the machine you are SSH'd into(including DNS resolution!). This is really handy for things like accessing otherwise unreachable resources or other internal resources externally. I use it for accessing iDRAC/IPMI/ESXi (you can also tell Java to use the proxy so VMRC works as well). It is also handy to be able to put all your web traffic as originating from a remote VPS with no advanced setup required.

Re:SSH hacks – a little sanity for remote workers by segfaultbuserr on Thursday April 30, 2020 @01:43AM (#23027789)
> Now, when you use Firefox it is as if you are using Firefox on the machine you are SSH'd into(including DNS resolution!).

Don't forget to check the "Proxy DNS when using SOCKS v5" option in Firefox.

Re:SSH hacks – a little sanity for remote workers by fnordist on Thursday April 30, 2020 @04:07AM (#23028596)
I use the Socks-Proxy only for internal Websites:

You habe to create a local "proxy.pac" file with the following contents:

function FindProxyForURL(URL,host) { host = host.toLowerCase(); if (shExpMatch(host,"*.my-company.com")) { return "SOCKS5 127.0.0.1:9090"; } return "DIRECT"; }

Then set "file:///path/to/proxy.pac" as auto-config URL in the Firefox-proxy-settings. Don't forget to enable DNS-Requests over SOCKS5.

For services, which you can't proxy with SOCKS5, you can use LocalForward in your ssh_config: Match host your-workstation !exec "nc -vz xmpp.my-company.com 5222 &>/dev/null || { echo 'xmpp.my-company.com not reachable, using LocalForward' 1>&2 && exit 1 ; }" LocalForward 127.0xcafe1:5222 xmpp.my-company.com:5222

Then add the following line to your /etc/hosts: 127.12.175.225 xmpp.my-company.com

Re:SSH hacks – a little sanity for remote workers by orbitingpluto on Thursday April 30, 2020 @02:51AM (#23028129)
I used to do this all the time over port 53.

My closest coffee shop would allow people to access Wi-Fi only if you gave them full access to your Facebook account. DNS was the only port open to the outside world.

Re:SSH hacks – a little sanity for remote workers by s_gourichon on Thursday April 30, 2020 @04:08AM (#23028601)
> My closest coffee shop would allow people to access Wi-Fi only if you gave them full access to your Facebook account.

What the???

Re:SSH hacks – a little sanity for remote workers by mercora on Thursday April 30, 2020 @07:10AM (#23029607)
I've seen this on Ubiquity hardware as an option too. Apparently it requires you to "check-in" via facebook to use it, whatever that means exactly. There is also an option to login via facebook without this though.
Re:SSH hacks – a little sanity for remote workers by orbitingpluto on Thursday April 30, 2020 @07:40AM (#23029778)
This was awhile back and was particularly nasty. No token, no check-ins, it was an unapologetic man-in-the-middle login prompt.

Terms of service had wording that made mining all data in your Facebook account sound like the intent.

Re:SSH hacks – a little sanity for remote workers by jandrese on Thursday April 30, 2020 @01:00PM (#23033143)
How about no. Or hell no. If I see a request like that it is an immediate disconnect. Might as well have a requirement that they do a full anal cavity sweep before they can sell you a cup of coffee.
Re:SSH hacks – a little sanity for remote workers by MaxBarraclough on Thursday April 30, 2020 @04:59AM (#23028872)
Interesting that they permit TCP port 53, rather than just UDP port 53.
Re:SSH hacks – a little sanity for remote workers by kubanczyk on Thursday April 30, 2020 @05:23AM (#23028994)
RFC7766 "Recursive server (or forwarder) implementations MUST support TCP so that they do not prevent large responses from a TCP-capable server from reaching its TCP-capable clients."

large responses == some DNSSEC, some IPv6

Re:SSH hacks – a little sanity for remote workers by Piskvorrr on Thursday April 30, 2020 @05:19AM (#23028975)
My guess is that it stems from lax firewall defaults. "Allow port 53 - [tcp/udp/BOTH]?" (Yeah, I know that DNS can also work over 53/tcp, but it's rare compared to the 53/udp volume)
Re:SSH hacks – a little sanity for remote workers by acdha on Thursday April 30, 2020 @02:41PM (#23034470)
It's not as rare as it used to be a couple decades ago. If you block tcp/53 you will find a surprising number of things breaking as record sizes have increased over the years.
Re:SSH hacks – a little sanity for remote workers by mercora on Thursday April 30, 2020 @07:13AM (#23029630)
i think that is fine actually. however, if i would implement such thing i would probably redirect DNS traffic to my DNS server as long as you are not authenticated :)
Re:SSH hacks – a little sanity for remote workers by mgr86 on Thursday April 30, 2020 @07:01AM (#23029560)
I have been doing the same thing for awhile. It allows me to access all the services we have set up on the intranet in the office. With Tmux I move around from machine to machine and keep all the work stuff in the office.

The office is also a large university. Therefore, I have access to many additional library and other subscription services.

It’s great as a lot of the office struggled to get a work setup in place. I’m happily the only one who didn’t need Gotomypc. It also helped me save time durning this transition by not having to answer my less technical coworkers questions about getting Gotomypc set up.

Re:SSH hacks – a little sanity for remote workers by anonymousDan on Thursday April 30, 2020 @05:45AM (#23029117)
Can I use this to potentially view a pdf on a remote server locally (as an alternative to an X server)? Would it be more efficient?
Re:SSH hacks – a little sanity for remote workers by practical_lem on Thursday April 30, 2020 @06:39AM (#23029420)
For those tasks I just use sshfs. I keep a ~/n/${host} directory where I access remote files like they were on my machine.