Use SSH to access servers behind firewalls
Mon, Sep 9 2002 at 9:52AM PDT • Contributed by: AlwaysMac
Mon, Sep 9 2002 at 9:52AM PDT • Contributed by: AlwaysMac
I often want to access my office's intranet and Samba fileserver while at home. There's a firewall in the way of course. However SSH from my static DSL IP is allowed, so the solution is to forward local ports on the Mac to a box with sshd inside the firewall.
For example if you want to access an internal intranet, connect to an internal proxy from your office desktop via an ssh connection:
To access a Samba file server use something like this:
These examples assume your intranet servers are in the public DNS; if not, you'll have to add entries to your Mac's hosts file.
For example if you want to access an internal intranet, connect to an internal proxy from your office desktop via an ssh connection:
% ssh -N -L 8888:proxy.xyz.com:3128 \What is going on here is connections to your Mac's localhost port 8888 are tunneled to your office machine, which then forwards it to the office web proxy that is listening on port 3128. Then set your browser's proxy to localhost port 8888 and start browsing!
my.office.desktop.xyz.com
To access a Samba file server use something like this:
% sudo ssh -v -l username -i ~username/.ssh/identity -N -L \The go to Finder -> Go -> Connect to Server -> Address, and input the folder you want, ie smb://localhost/Docs.
139:samba.xyz.com:139 my.office.desktop.xyz.com
These examples assume your intranet servers are in the public DNS; if not, you'll have to add entries to your Mac's hosts file.
•
[15,673 views]
