committed by
root
8 changed files with 45 additions and 55 deletions
@ -1,30 +1,33 @@ |
|||
#! /sbin/nft -f |
|||
|
|||
table ip nat { |
|||
|
|||
set radius_federez { |
|||
type ipv4_addr |
|||
elements = { 62.210.81.204, 185.230.78.47 } |
|||
} |
|||
|
|||
chain prerouting { |
|||
type nat hook prerouting priority 0; |
|||
meta iifname $if_prerezotage ip daddr != { $intranet, $comnpay, $website } tcp dport {http,https} dnat $bounce_server; |
|||
ip saddr $range_prerezotage ip daddr != { $intranet, $comnpay, $website } tcp dport {http,https} dnat $bounce_server; |
|||
ip saddr @radius_federez ip daddr $ip_self_public tcp dport { 636, 389 } dnat $ip_radius; |
|||
ip saddr @radius_federez ip daddr $ip_self_public udp dport { 636 } dnat $ip_radius; |
|||
} |
|||
|
|||
|
|||
chain postrouting { |
|||
type nat hook postrouting priority 100 |
|||
|
|||
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 |
|||
ip daddr != {10.0.0.0/8, $range_public} ip saddr vmap { |
|||
$range_adherent : goto adherent_nat, |
|||
$range_admin : goto admin_nat, |
|||
$range_federez : goto federez_nat, |
|||
$range_aloes : goto aloes_nat, |
|||
$range_prerezotage : goto prerezotage_nat |
|||
} |
|||
|
|||
counter |
|||
|
|||
# ip saddr 10.0.0.0/8 snat to 193.48.225.3 |
|||
snat to 193.48.225.3 |
|||
|
|||
|
|||
ip daddr != {10.0.0.0/8, $range_public} ip saddr != $range_public snat to $ip_self_public |
|||
} |
|||
|
|||
} |
|||
|
|||
Loading…
Reference in new issue