diff options
author | Pablo Neira Ayuso <pablo@netfilter.org> | 2020-04-24 21:56:51 +0200 |
---|---|---|
committer | Pablo Neira Ayuso <pablo@netfilter.org> | 2020-04-28 17:32:35 +0200 |
commit | 35a6b10c1bc488ca195e9c641563c29251f725f3 (patch) | |
tree | 60e24b067eb7658e3b7f355eb268b0732f80af22 /include/statement.h | |
parent | c2da6d7774aa9c2629d168f6d27be7797970d7a2 (diff) |
src: add netmap support
This patch allows you to specify an interval of IP address in maps.
table ip x {
chain y {
type nat hook postrouting priority srcnat; policy accept;
snat ip prefix to ip saddr map { 10.141.11.0/24 : 192.168.2.0/24 }
}
}
The example above performs SNAT to packets that comes from
10.141.11.0/24 using the prefix 192.168.2.0/24, e.g. 10.141.11.4 is
mangled to 192.168.2.4.
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'include/statement.h')
-rw-r--r-- | include/statement.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/include/statement.h b/include/statement.h index 8427f47e..01fe416c 100644 --- a/include/statement.h +++ b/include/statement.h @@ -121,6 +121,7 @@ extern const char *nat_etype2str(enum nft_nat_etypes type); enum { STMT_NAT_F_INTERVAL = (1 << 0), + STMT_NAT_F_PREFIX = (1 << 1), }; struct nat_stmt { |