]> git.ipfire.org Git - thirdparty/libvirt.git/commit
net: support set public ip range for forward mode nat
authorNatanael Copa <ncopa@alpinelinux.org>
Tue, 19 Feb 2013 10:44:14 +0000 (11:44 +0100)
committerLaine Stump <laine@laine.org>
Tue, 19 Feb 2013 19:42:18 +0000 (14:42 -0500)
commit905629f47ed6eb12e149be45a10da2b61082ed88
tree838ef31dcdb132fb3cd9226c6f7b438758dcb9c4
parent5d6f636764399fd7dab9cbe07addd7b89a0bfc77
net: support set public ip range for forward mode nat

Support setting which public ip to use for NAT via attribute
address in subelement <nat> in <forward>:

...
  <forward mode='nat'>
      <address start='1.2.3.4' end='1.2.3.10'/>
  </forward>
...

This will construct an iptables line using:

  '-j SNAT --to-source <start>-<end>'

instead of:

  '-j MASQUERADE'

Signed-off-by: Natanael Copa <ncopa@alpinelinux.org>
Signed-off-by: Laine Stump <laine@laine.org>
docs/formatnetwork.html.in
src/conf/network_conf.c
src/conf/network_conf.h
src/network/bridge_driver.c
src/util/viriptables.c
src/util/viriptables.h