Redirections from virtual interfaces.
Hello,
I have an server with only one NIC, this NIC has a Public IP, this server is locate in a data center, I can't have more than one, but I can have many IP's, so I would like to know if I can redirect packages from virtual interface for my VM's?
Examples:
eth0:1 xxx.xx.xxx.xxx redirec all trafic to 192.168.122.200 eth0:2 xxx.xx.xxx.xxy redirec all trafic to 192.168.122.150 eth0:3 xxx.xx.xxx.xxz redirec all trafic to 192.168.122.180
I'm using /etc/libvirt/hooks/qemu to write iptables rules.
Regards,
Signature · 6 lines
Atenciosamente, Targino Silveira targinosilveira.com [email protected] +55(85)8626-7297/8779-5115
Quoted 5 lines · Targino SIlveira
I have an server with only one NIC, this NIC has a Public IP, this server is locate in a data center, I can't have more than one, but I can have many IP's, so I would like to know if I can redirect packages from virtual interface for my VM's?
Quoted 7 lines
Examples:
eth0:1 xxx.xx.xxx.xxx redirec all trafic to 192.168.122.200 eth0:2 xxx.xx.xxx.xxy redirec all trafic to 192.168.122.150 eth0:3 xxx.xx.xxx.xxz redirec all trafic to 192.168.122.180
I'm using
/etc/libvirt/hooks/qemuto write iptables rules.
Yes, look at NAT. A lot of material probably covers NAT behind one public IP, in this case you actually need to map public addresses onto private addresses 1:1.
A web search for "linux nat" should turn up howtos. Or check on libvirt.org if there is libvirt configuration that automatically sets this up for you.
Stefan