Hello,
you must configure Bastion host as an intermediate host between the home computer and the destination host (Linux host).
I assume that the Linux desktop you want to connect to has disabled external IP connections. Bastion host and Linux desktop are in the same internal LAN.
In the VPC network in Firewall:
1) Add a rule allowing connections to port 4000 (you can set a different port) e.g. using „Targets tags”. If your Windows host has a fixed IP you can set the connection permission only for that IP.
2) Add a rule that accepts connections from the local network to any port or only to port 4000 e.g. using „Targets tags”
In Compute Engine:
Assign this rule 1 to the Bastion host, e.g. using „Targets tags”.
Assign the rule 2 to a Linux host, e.g. with “Target tags”.
Log in to the Bastion host and add rules to redirect traffic on port 4000 to Linux host using iptables
Set traffic redirection from port 4000 to Linux host:
sysctl net.ipv4.ip_forward=1
iptables -t nat -A PREROUTING -p tcp –dport 4000 -j DNAT –to-destination x.x.x.x:4000
iptables -t nat -A PREROUTING -p udp –dport 4000 -j DNAT –to-destination x.x.x.x:4000
iptables -t nat -A POSTROUTING -j MASQUERADE
Where x.x.x.x is the local Linux host IP.
Now connecting to Bastion host on port 4000 using NXPlayer the connection will be transferred to your Linux host.
Regards
Tom