[ale] kvm port forwarding confusion, kindly help

Narahari 'n' Savitha savithari at gmail.com
Tue Jun 2 20:04:53 EDT 2015


Friends:

I setup KVM and have created two VM's.  I also setup the NAT way of
connecting (uffffff)

Now I have some confusion.

On the host, I can do

ssh user at 192.168.100.101

It connects.

I also do

ssh user at 192.168.100.102

It connects


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 ?

======================

Secondly which is more important, for port forwarding to work so I can
connect to the vm's directly

Is IPTABLES the only way to set the host up to forward traffic ?

or

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) ?

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 ?

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.

Thank You for your time and attention.

-N
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.ale.org/pipermail/ale/attachments/20150602/08dd10cf/attachment.html>


More information about the Ale mailing list