Development
This commit is contained in:
parent
6d8be4845e
commit
bc623b14fc
5 changed files with 64 additions and 49 deletions
|
|
@ -68,7 +68,7 @@ Validation:
|
|||
Generates DNAT rules only; no forward chain rules needed
|
||||
since redirect_to is always a local IP (INPUT handles it).
|
||||
inter_vlan_exceptions -- src_ip_or_subnet and dst_ip_or_subnet may be a single IPv4 address
|
||||
or a CIDR network. dst_port_min/dst_port_max are optional (1-65535).
|
||||
or a CIDR network. dest_port_start/dest_port_end are optional (1-65535).
|
||||
Protocol must be tcp, udp, or both.
|
||||
|
||||
Usage:
|
||||
|
|
@ -1560,8 +1560,8 @@ def build_nft_config(data, dry_run=False):
|
|||
for r in all_except:
|
||||
src = r["src_ip_or_subnet"]
|
||||
dst = r.get("dst_ip_or_subnet") or r.get("dst_ip", "")
|
||||
min_p = r.get("dst_port_min") or r.get("dst_port")
|
||||
max_p = r.get("dst_port_max")
|
||||
min_p = r.get("dest_port_start") or r.get("dst_port")
|
||||
max_p = r.get("dest_port_end")
|
||||
if min_p and max_p and str(min_p) != str(max_p):
|
||||
port_spec = f"{min_p}-{max_p}"
|
||||
elif min_p:
|
||||
|
|
@ -1739,8 +1739,8 @@ def apply_nftables(data, dry_run=False):
|
|||
for r in active_except:
|
||||
src = r["src_ip_or_subnet"]
|
||||
dst = r.get("dst_ip_or_subnet") or r.get("dst_ip", "")
|
||||
min_p = r.get("dst_port_min") or r.get("dst_port")
|
||||
max_p = r.get("dst_port_max")
|
||||
min_p = r.get("dest_port_start") or r.get("dst_port")
|
||||
max_p = r.get("dest_port_end")
|
||||
if min_p and max_p and str(min_p) != str(max_p):
|
||||
port_str = f":{min_p}-{max_p}"
|
||||
elif min_p:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue