3 ms·
I had a poor man's ssh VPN before we got a real VPN at work. The basic idea was for each host and port, H:P, that I needed to access at work from home I'd put
by tzs 11y ago
I had a poor man's ssh VPN before we got a real VPN at work.
The basic idea was for each host and port, H:P, that I needed to access at work from home I'd put an entry in /etc/hosts with a 10.10.10.x IP address.
I'd pick some local port, L, and set up ssh to forward 127.0.0.1:L to remote H:P.
Finally, I'd set up via iptables (Linux) or ipfw (OS X) a rule to turn connections to 10.10.10.x:P into connections to 127.0.0.1:L.
ipfw disappeared from OS X with Yosemite (and I vaguely recall that something changed in OS X networking earlier, maybe around Mountain Lion, that broke the way I was using it) and since we have a real VPN now I haven't tried to figure out how to fix my poor man's VPN.
Here is a reddit comment giving examples of the hosts, ssh config, and iptables commands to set up a sample poor man's VPN this way: https://www.reddit.com/r/linux/comments/13nuda/poor_mans_vpn_with_ssh/c75peqd https://www.reddit.com/r/linux/comments/13nuda/poor_mans_vpn...
This actually worked very well, giving me full transparent access to everything I needed for working at home as if I was at the office.