Secure RDP connection through Vyatta using PuTTY

vyatta-rdpConnecting to SSH Server as gateway instead of directly RDP to a PC is safer way and add another layer ofencryption.With this method,we can connect to any client that is behind the firewall provided that we have open the port 22 (or any other SSH port) to the SSH Server.

In First step, we’ll configure the vyatta, so that it will forward the ssh request to the internal Linux server that it will receive on it’s port 222.

(From the Configuration Mode, issue these commands)

set nat destination rule 110 description "SSH to internal Host"
set nat destination rule 110 inbound-interface eth0
set nat destination rule 110 protocol tcp
set nat destination rule 110 translation address
set nat destination rule 110 translation port 22
set nat destination rule 110 destination port 222
set nat destination rule 110 destination address X.X.X.X

1Next, configure the vyatta Firewall, so that it will allow the inbound SSH and RDP connections.

set firewall name IN_WAN
edit firewall name IN_WAN
set default-action drop
set rule 100 action accept
set rule 100 description "SSH to Internal Linux"
set rule 100 destination port 3389,22
set rule 100 protocol tcp
set rule 100 state established enable
set rule 100 state related enable

2Apply the firewall on inside direction on outbound interface.

set interfaces ethernet eth0 firewall in name IN_WAN

3Here is visual, how to Remote Desktop over SSH using PuTTY from Windows Machine.
Run PuTTY,enter the Public IP address or hostname of the Vyatta:

4On the left-hand panel, Go to Connection -> SSH and check “Enable compression“:

5Next, Go to Connection -> SSH -> Tunnels:

Set “Source Port” to any random Source port provided that it is not being used already.
Set “Destination” to Private IP Address of Remote Desktop Client and add “:3389″ at the end, which is the default Remote Desktop port.

Click on “Add“.

6Save the Session Settings.

7Click Open button in order to connect to the Server via SSH. Login to the Linux Server with username and password

8Start Remote Desktop Client on windows and enter the (The random port that you have selected above)

9Enter the username and password.





Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.