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 of encryption.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


Next, 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


Apply the firewall on inside direction on outbound interface.

set interfaces ethernet eth0 firewall in name IN_WAN


Here 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:


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


Next, 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“.


Save the Session Settings.


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


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


Enter the username and password.




Hope this will help you!

Please Remember me in your prayers!

Enjoy :-)

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: