firewall/nat.nft

31 lines
607 B
Text
Raw Normal View History

2019-01-07 22:48:42 +00:00
#! /sbin/nft -f
2019-02-09 09:23:05 +00:00
table ip nat {
2019-01-07 22:48:42 +00:00
chain prerouting {
type nat hook prerouting priority 0;
2019-02-09 09:23:05 +00:00
meta iifname $if_prerezotage ip daddr != { $intranet, $comnpay, $website } tcp dport {http,https} dnat $bounce_server;
2019-01-07 22:48:42 +00:00
}
chain postrouting {
type nat hook postrouting priority 100
2019-02-09 09:23:05 +00:00
2019-03-26 21:02:43 +00:00
meta oifname != $if_supelec return
meta iifname vmap {
$if_adherent : jump adherent_nat,
$if_admin : jump admin_nat,
$if_federez : jump federez_nat,
$if_aloes : jump aloes_nat,
$if_prerezotage : jump prerezotage_nat
}
counter
2019-03-12 21:06:21 +00:00
# ip saddr 10.0.0.0/8 snat to 193.48.225.3
2019-03-26 21:02:43 +00:00
snat to 193.48.225.3
2019-01-07 22:48:42 +00:00
}
}