2024-05-02 09:31:34 +00:00
|
|
|
flush ruleset
|
|
|
|
|
|
|
|
table ip filter {
|
|
|
|
map ip_map_snat {
|
|
|
|
type ipv4_addr : ipv4_addr
|
|
|
|
}
|
|
|
|
map ip_map_dnat {
|
|
|
|
type ipv4_addr : ipv4_addr
|
|
|
|
}
|
|
|
|
|
|
|
|
set local_range {
|
|
|
|
type ipv4_addr
|
|
|
|
flags interval
|
|
|
|
}
|
|
|
|
|
|
|
|
set remote_range {
|
|
|
|
type ipv4_addr
|
|
|
|
flags interval
|
|
|
|
}
|
|
|
|
|
|
|
|
set local_translated_range {
|
|
|
|
type ipv4_addr
|
|
|
|
flags interval
|
|
|
|
}
|
|
|
|
|
|
|
|
chain postrouting {
|
|
|
|
type nat hook postrouting priority 100; policy accept;
|
|
|
|
|
2024-07-30 12:55:06 +00:00
|
|
|
ip daddr @remote_range snat to ip saddr map @ip_map_snat
|
2024-05-02 09:31:34 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
chain prerouting {
|
|
|
|
type nat hook prerouting priority 100; policy accept;
|
|
|
|
|
2024-07-30 12:55:06 +00:00
|
|
|
ip daddr @local_translated_range dnat to ip daddr map @ip_map_dnat
|
2024-05-02 09:31:34 +00:00
|
|
|
}
|
2024-07-30 12:55:06 +00:00
|
|
|
}
|