<p dir="ltr">Never mind on the first question. I figured that the host is a member of the NAT network as well.</p>
<p dir="ltr">Port forwarding is still a mystery though.</p>
<div class="gmail_quote">On Jun 2, 2015 8:04 PM, "Narahari 'n' Savitha" <<a href="mailto:savithari@gmail.com">savithari@gmail.com</a>> wrote:<br type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Friends:<div><br></div><div>I setup KVM and have created two VM's. I also setup the NAT way of connecting (uffffff)</div><div><br></div><div>Now I have some confusion.</div><div><br></div><div>On the host, I can do </div><div><br></div><div>ssh <a href="mailto:user@192.168.100.101" target="_blank">user@192.168.100.101</a></div><div><br></div><div>It connects.</div><div><br></div><div>I also do </div><div><br></div><div>ssh <a href="mailto:user@192.168.100.102" target="_blank">user@192.168.100.102</a><br></div><div><br></div><div>It connects</div><div><br></div><div><br></div><div>As you can see both connect on port 22, How is that possible ? should I have to do some kind of port forwarding ? How does KVM allow both VM's to run on port 22 ?</div><div><br></div><div>======================</div><div><br></div><div>Secondly which is more important, for port forwarding to work so I can connect to the vm's directly </div><div><br></div><div>Is IPTABLES the only way to set the host up to forward traffic ?</div><div><br></div><div>or</div><div><br></div><div>Can I use stuff specific to KVM where I can do port forwarding to specific vm ip's (5555 on host forwards to 192.168.100.101 port 22 but 4444 on host forwards to 192.168.100.102) ?</div><div><br></div><div>Virtual box and VMware allow this and there are nice tools to configure at the Hypervisor level. Does KVM allow this thru KVM-NAT-CONFIG ?</div><div><br></div><div>Most examples I have googled lead me to the IPTABLES approach and I sure there must be a different more simple non-monsterous (read iptables) way.</div><div><br></div><div>Thank You for your time and attention.</div><div><br></div><div>-N</div><div><br></div><div><br></div></div>
</blockquote></div>