commandlinefu.com is the place to record those command-line gems that you return to again and again.
You can sign-in using OpenID credentials, or register a traditional username and password.
Subscribe to the feed for:
It connects to XXX.XXX.XXX.XXX port YYY, using a source port of "srcport" and binds the tunnel on local port "locport". Then you can connect to localhost:locport.
With this command it's possible to connect to servers using a specific source port (useful when a firewall check the source port). Because of the connections starting from the same source port, this works well only for the first connection (for example, works well with SSH and bad with HTTP because of multiple requests).
* It requires socat
There are 5 alternatives - vote for the best!
If you can do better, submit your command here.
You must be signed in to comment.