1

Ive got a Dedicated Server with 2 Public IP Adresses and would like to route all eth0:1 traffic to a KVM Guest via iproute2 or even iptables. Outgoing Traffic should also be routed to eth0:1 - eth0 and eth0:1 are assigned in different Subnets.

Setup is/should be as following: 178.1.2.3 eth0:1 <-> 192.168.1.254 br1, gateway for tap1 <-> 192.168.1.1 KVM Guest

5

This seems way too complex. Just bridge the VM and set the IP address in the guest.

-1

it actually was surprisingly simple:

-A PREROUTING -d 178.1.2.3/32 -j DNAT --to-destination 192.168.1.1
-A POSTROUTING -s 192.168.1.1/32 -j SNAT --to-source 178.1.2.3

thanks anyway!

  • 2
    Yeah, and now you have completely unnecessary NAT which is going to make your life more difficult later. :) – Michael Hampton Oct 21 '12 at 16:53

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.