端口转发:
setting->network->
adapter:attached to NAT.
port forwarding rules->
name protocol host ip host port guest ip guest port
rule1 tcp 127.0.0.1 20022 10.0.2.15 22
rule1 tcp 10.36.1.193 20022 10.0.2.15 22
iptables -I INPUT -p tcp -s 10.36.0.1/24 --dport 20022 -j ACCEPT
iptables -I INPUT -p tcp -s 10.36.1.0/24 --dport 20022 -j ACCEPT
iptables-save
iptables-save > /etc/sysconfig/iptables
ssh op@127.0.0.1 -p 2002
ipsdj
详解: