basic ssh proxy
So here’s the problem I connect from home which puts me into the network on subnet A which let’s me talk to subnet B. Subnet B can talk to production servers on subnet C but connections from subnet A cannot go directly to subnet C. Well this puts me in a pickle as I really want to browse something coming from a webserver on subnet C from home where I can work in my pjs.
Like most things linux comes to the rescue.
My work desktop is on subnet B so all I need to do is setup a little proxy, thus I enter the command:
ssh -L desktop.ip:port:remote.server:port -l account -N remote.server
A better example would be getting at our tomcat server to pull up from stuff in OpenNMS to diagnose a server problem, this is hypothetical of course because our servers never have problems. In this case my segement B desktop is on 10.168.1.50 and the OpenNMS/Tomcat server is at 192.168.0.150. So I log into my linux desktop (ubuntu 6.06 in this case) on 10.168.1.50 and fire up:
ssh -L 10.168.1.50:8080:192.168.0.150:8080 -l useraccount -N 192.168.0.150
I can then aim my brower at the subnet B address from my VPN connection on subnet A to http://10.168.1.50:8080 and whammo I’ve got the OpenNMS session kicking from subnet C and I’m looking for whomever is the evil server that decided it needed to make my afternoon interesting.
1 Comment
"Like most things linux comes to the rescue."
You are such a geek. 😉