0

Trying to NAT ips in different network using iptables.

KVM host with ip 10.10.11.36 on bridge br0.

Two vms are running with ip 192.168.11.60 and 192.168.11.57 sharing bridge br0.

Want to NAT all request coming on 10.10.11.60 to 192.168.11.60.

How can this be done with out using SNAT.

tried this:

On host bridge br0 created an alias br0:0 with ip 192.168.11.36 and specified this in guest as gateway.

NAT rule.

DNAT       all  --  anywhere             10.10.11.60         to:192.168.11.60  

ofcourse rule counter is not increasing,

How to make NAT work here?

Kevin Parker
  • 757
  • 1
  • 13
  • 32

1 Answers1

1

Did you mention two network connected to same bridge?

It can not work create two bridges one for 10.10.11 and other for 192.168.11

then try your NAT ing rule

ananthan
  • 1,510
  • 1
  • 18
  • 28