laferrierejc

Untitled

Oct 8th, 2017
218
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.53 KB | None | 0 0
  1. #on Jump (note, I just found out that the iptables is redundant, ssh tunneling does enough)
  2. iptables -t nat -A PREROUTING -p tcp --dport 3389 -j DNAT --to-destination <localRDP_IP>:3389
  3. iptables -t nat -A POSTROUTING -p tcp -d <localRDP_IP> --dport 3389 -j SNAT --to-source <jumpIP>
  4.  
  5. #on client computer, connect via ssh (I use mobaxterm)
  6. ssh -p 2022 -L 9389:<localRDP_IP>:3389 user@<publicIP>
  7.  
  8. #all that is needed
  9. ssh -p <ssh port of anyIPonRDPIP_Net> -L 9389:<localRDP_IP>:3389 user@<anyIPonRDPIP_Net>
  10.  
  11. #then rdp into 127.0.0.1:9389
Advertisement
Add Comment
Please, Sign In to add comment