Ethical Hacking

Learn to find vulnerabilities before the bad guys do! Gain real world hands on hacking experience in our state of the art hacking lab. Course designed and taught by expert instructors with years of penetration testing experience. 12 student maximum in every class. Certification attempt included in every package.
Computer Forensics Training at InfoSec Institute

Gain the in-demand skills of a certified computer examiner, learn to recover trace data left behind by fraud, theft, and cybercrime perpetrators. Discover the source of computer crime and abuse at your organization so that it never happens again. All of our class sizes are guaranteed to be 12 students or less to facilitate one-on-one interaction with one of our expert instructors.




Network Security Secure-Shell
[Top] [All Lists]

Re: ssh -L syntax question

Subject: Re: ssh -L syntax question
Date: Fri, 14 Mar 2008 16:18:53 -0400
grandsatrap wrote:
What is the difference between ssh -L 2000:localhost:5900 frank@server.me.org
This one will forward local connections to port 2000, by connecting them to 127.0.0.1:5900 from server.me.org
and ssh -L 2000:server.me.org:5900 frank@server.me.org ?
This one will forward local connections to port 2000, by connecting to the IP address that "server.me.org" resolves to, at port 5900 from server.me.org.

I am not sure, but I think that the lookup is done from server.me.org, rather than your "local" machine. It will probably look in /etc/hosts first, and then ask via DNS.

The distinction here is important, as 127.0.0.1 is (almost) always assigned to the lo0 interface, whereas the IP returned from resolving "server.me.org" will most likely be assigned to the same network interface that you are connecting on. So, for instance, you could set your VNC server to only listen for incoming connections on port 127.0.0.1, for a more "secure" approach using ssh in this fashion. Otherwise, you have to make sure that your firewall blocks incoming on port 5900.

--
Coleman

<Prev in Thread] Current Thread [Next in Thread>