Connecting 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 192.168.80.102 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 commit
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 commit
set interfaces ethernet eth0 firewall in name IN_WAN commit
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“.