Answer the question
In order to leave comments, you need to log in
Port forwarding to a virtual machine (Libvrt, QEMU, CentOS. WS2012R2)?
Hello!
There is a Windows Server 2012R2 virtual machine, on CentOS 6.7.
In general, you need to forward the port for FTP.
For example:
external IP xx.xxx.xx.xxx, eth0
Virtual machine IP yy.yyy.yyy.yy, virbr0
In this case?
iptables -t nat -A PREROUTING --dst xx.xxx.xx.xxx -p tcp --dport 21 -j DNAT --to-destination yy.yyy.yyy.yy
iptables -I FORWARD 1 -i eth0 -o virbr0 -d yy.yyy.yyy.yy -p tcp -m tcp --dport 21 -j ACCEPT
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question