Port forwarding using proxypass in local machine
Consider a scenario, where a jumpbox has port access to a server and your local machine doesn’t have access. Here is a solution that you can apply that will redirect your request to jumpbox and you can access the server using loop back IP address from your local machine.
ssh -L:<SOURCEPORT>:IPADDRESS:<DESTINATIONPORT> userid@<JUMPBOXIPADDRESS>
Where,
SOURCEPORT – Local Port number
IPADDRESS- Remote Server IP address
DESTINATIONPORT- Remote server port number
JUMPBOXIPADDRESS – Server which has access to remote server IP address
Eg:
Configure RDP port forwarding request from local machine to remote server using jumpbox.
ssh -L 3389:IPADDRESS:3389 root@JUMPBOXIP
Let’s try access RDP using 127.0.0.1.
Post your queries here 🙂