80后的细娃儿

qemu怎么做端口转发

做80和3389端口转发

方法1:

qemu -hda XXX.img -boot c -m 300M -k de -usb -redir tcp:3389::3389 -redir tcp:80::80

 

方法2:

echo “1”>/proc/sys/net/ipv4/ip_forward  

/sbin/iptables -t nat -A PREROUTING -i eth1 -d 172.16.0.90 -p tcp -m tcp –dport 3389 -j DNAT –to-destination 10.3.0.2:3389

点赞