I have SSH access to a jump box on my work. This jump box gives access to the complete network infrastructure at work. This is great to work from home.
I am able to run a SOCKS5 proxy on the jump box (via ssh -D) and successfully managed to configure my browser to use that SOCKS5 proxy for work hosts (via https://getfoxyproxy.org). Foxyproxy seems to forward DNS requests to that SOCKS5 proxy, so all is working fine.
My problem is that other tools, such as Maven (for building Java), is able to use a SOCKS5 proxy, but unable to forward DNS over it, unfortunately. This is a known limitation, as far as I know. So I ended up adding my work servers to /etc/hosts.
I am looking for a more dynamic and definite solution, to remove the burden of having to maintain /etc/hosts. In essence, I would like to keep using my ISPs DNS server as of now, but I want to forward DNS requests for my work servers (and only for them) to that jump box (either via SSH or that SOCKS5 proxy).
Is that possible?
/etc/resolv.conf, and find out which way your distro uses to set this up (systemd, ...). Then configure this service to use your jump box as DNS server. – dirkt Jul 06 '19 at 06:24google.com, as an example, should still be handled by my ISP, and not my work. – Pritzl Jul 06 '19 at 06:31tmuxto maintain an active session and do all my work on the remote machine. Obviously the suitability of this depends on how beefy your remote machine is :-) – Aaron F Jul 06 '19 at 14:54tmux, but did decide not to use it. I would rather do everything locally at home, instead in some session on some host at work. Thanks for the idea though! – Pritzl Jul 07 '19 at 18:43