2024-10-21 17:50:28 +00:00
|
|
|
set tpws_exclude4 {
|
|
|
|
type ipv4_addr; flags interval; auto-merge;
|
2024-10-21 19:18:30 +00:00
|
|
|
elements = { 10.0.0.0/8,172.16.0.0/12,192.168.0.0/16,169.254.0.0/16,127.0.0.0/8 }
|
2024-10-21 17:50:28 +00:00
|
|
|
}
|
|
|
|
set tpws_exclude6 {
|
|
|
|
type ipv6_addr; flags interval; auto-merge;
|
2024-10-21 19:18:30 +00:00
|
|
|
elements = { fc00::/7, fe80::/10, ::1 }
|
2024-10-21 17:50:28 +00:00
|
|
|
}
|
|
|
|
chain tpws_pre {
|
2024-10-21 14:43:29 +00:00
|
|
|
type nat hook prerouting priority dstnat; policy accept;
|
2024-10-21 17:50:28 +00:00
|
|
|
tcp dport {80,443} ip daddr != @tpws_exclude4 redirect to :900
|
|
|
|
tcp dport {80,443} ip6 daddr != @tpws_exclude6 redirect to :900
|
2024-10-21 14:43:29 +00:00
|
|
|
}
|
|
|
|
chain tpws_out {
|
|
|
|
type nat hook output priority -100; policy accept;
|
2024-10-21 17:50:28 +00:00
|
|
|
tcp dport {80,443} skuid != daemon ip daddr != @tpws_exclude4 redirect to :900
|
|
|
|
tcp dport {80,443} skuid != daemon ip6 daddr != @tpws_exclude6 redirect to :900
|
2024-10-21 14:43:29 +00:00
|
|
|
}
|