domainhoogl.blogg.se

Create ssh proxy
Create ssh proxy







create ssh proxy

thus firewall doesn't interfere nor -g is necessary this can be done by ssh -L $some_port:localhost:$port_number $your_IP invoked at their side or ssh -R $some_port:localhost:$port_number $their_IP invoked at your side clients will use localhost:$some_port as SOCKS server address in their browsers. via their own separate ssh connection so their connections appear local (as if A= B) to your already running ssh -D.

  • configure your firewall to allow incoming connections to TCP port $port_number.
  • If you'd like other computers to connect to your open port ( A≠ B, they will use $your_IP:$port_number as SOCKS server address) you need to: Your browser's traffic will be forwarded and sites you visit ( D) will see communication coming from the $hostname ( C) as if your browser run there. Let's say you run the ssh command shown above and you tell your local browser to use SOCKS at localhost:$port_number. Obviously any case where A= C gives no direct advantage over simple A -> D connection, but there are other useful cases. Some of these letters may refer to same machine in some particular usage cases.
  • D is any server, it sees communication from C and may not be aware that A and B are involved there may be many servers.
  • C is the $hostname B connects to communication that normally goes to D from A now reaches D from C.
  • create ssh proxy

    B is the machine where ssh -D $port_number C runs and where the TCP $port_number listens for incoming connections from any A.A represents a single client that uses B:$port_number as SOCKS address there may be many clients.But with proxy this is as follows: A -> B -> C -> D In general the situation without SOCKS proxy provided by ssh is like this: A -> D Note you may not be allowed to open some ports as regular user, especially lower than 1024, use higher number then. This will open the $port_number TCP port on your local computer and establish a SOCKS server on it.

    #CREATE SSH PROXY PASSWORD#

    You need to provide credentials (like $username and password when asked) valid to the $hostname machine. The first command will use your current (local) username unless your ssh_config file tells otherwise (by default it doesn't). Or ssh -D $port_number $hostname identifies some machine it can be IP address, address resolvable via DNS or via /etc/hosts file or via ssh_config file etc. Usage of ssh -D is indeed like this: ssh -D $port_number $hostname This syntax is not meant to be fully compatible with variables in any shell. Note: I use $ prefix for strings you have to substitute with your desired values.









    Create ssh proxy