37 lines
730 B
Text
37 lines
730 B
Text
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;
|
|
|
|
ip daddr @remote_range snat to ip saddr map @ip_map_snat
|
|
}
|
|
|
|
chain prerouting {
|
|
type nat hook prerouting priority 100; policy accept;
|
|
|
|
ip daddr @local_translated_range dnat to ip daddr map @ip_map_dnat
|
|
}
|
|
}
|