Remote desktop to Windows KVM machine

[root@ramesh ~]# sudo iptables -nL -v –line-numbers -t filter | more
Chain INPUT (policy ACCEPT 34274 packets, 3640K bytes)
num pkts bytes target prot opt in out source destination
1 14 936 ACCEPT udp — virbr0 * 0.0.0.0/0 0.0.0.0/0 udp dpt:53
2 0 0 ACCEPT tcp — virbr0 * 0.0.0.0/0 0.0.0.0/0 tcp dpt:53
3 7 2334 ACCEPT udp — virbr0 * 0.0.0.0/0 0.0.0.0/0 udp dpt:67
4 0 0 ACCEPT tcp — virbr0 * 0.0.0.0/0 0.0.0.0/0 tcp dpt:67

Chain FORWARD (policy ACCEPT 0 packets, 0 bytes)
num pkts bytes target prot opt in out source destination
1 29 3324 ACCEPT all — * virbr0 0.0.0.0/0 192.168.122.0/24 ctstate RELATED,ESTABLISHED
2 43 3542 ACCEPT all — virbr0 * 192.168.122.0/24 0.0.0.0/0
3 0 0 ACCEPT all — virbr0 virbr0 0.0.0.0/0 0.0.0.0/0
4 0 0 REJECT all — * virbr0 0.0.0.0/0 0.0.0.0/0 reject-with icmp-port-unreachable
5 0 0 REJECT all — virbr0 * 0.0.0.0/0 0.0.0.0/0 reject-with icmp-port-unreachable

Chain OUTPUT (policy ACCEPT 26948 packets, 19M bytes)
num pkts bytes target prot opt in out source destination
1 7 2308 ACCEPT udp — * virbr0 0.0.0.0/0 0.0.0.0/0 udp dpt:68

[root@ramesh ~]# iptables -D FORWARD 5 -t filter

[root@ramesh ~]# iptables -D FORWARD 4 -t filter

iptables -t nat -A PREROUTING -p tcp –dport 3389 -j DNAT –to-destination 192.168.122.165:3389

iptables -t nat -A POSTROUTING -p tcp –dport 53389 -d 192.168.122.165 -j SNAT –to 192.233.247.2

Posted in: Linux

Leave a Comment