feat: complete rules with all shorewall columns (origdest, rate, user, mark, connlimit, time, headers, switch, helper)
This commit is contained in:
@@ -18,7 +18,7 @@ import { zonesApi, interfacesApi, policiesApi, rulesApi, snatApi, hostsApi, para
|
||||
interface Zone { id: number; name: string; type: string; options: string }
|
||||
interface Iface { id: number; name: string; zone_id: number; options: string }
|
||||
interface Policy { id: number; src_zone_id: number; dst_zone_id: number; policy: string; log_level: string; comment: string; position: number }
|
||||
interface Rule { id: number; action: string; src_zone_id: number | null; dst_zone_id: number | null; src_ip: string; dst_ip: string; proto: string; dport: string; sport: string; comment: string; position: number }
|
||||
interface Rule { id: number; action: string; src_zone_id: number | null; dst_zone_id: number | null; src_ip: string; dst_ip: string; proto: string; dport: string; sport: string; origdest: string; rate_limit: string; user_group: string; mark: string; connlimit: string; time: string; headers: string; switch_name: string; helper: string; comment: string; position: number }
|
||||
interface Snat { id: number; source_network: string; out_interface: string; to_address: string; comment: string }
|
||||
interface Host { id: number; zone_id: number; interface: string; subnet: string; options: string }
|
||||
interface Param { id: number; name: string; value: string }
|
||||
@@ -147,17 +147,40 @@ export default function ConfigDetail() {
|
||||
},
|
||||
{ key: 'proto' as const, label: 'Proto' },
|
||||
{ key: 'dport' as const, label: 'DPort' },
|
||||
{ key: 'origdest' as const, label: 'OrigDest' },
|
||||
{ key: 'position' as const, label: 'Position' },
|
||||
] as Column<AnyEntity>[],
|
||||
fields: [
|
||||
{ name: 'action', label: 'Action', required: true },
|
||||
{ name: 'src_zone_id', label: 'Source Zone', type: 'select' as const, options: zoneOptions },
|
||||
{ name: 'dst_zone_id', label: 'Dest Zone', type: 'select' as const, options: zoneOptions },
|
||||
{ name: 'src_zone_id', label: 'Source Zone', type: 'select' as const, options: [{ value: '', label: 'all' }, ...zoneOptions] },
|
||||
{ name: 'dst_zone_id', label: 'Dest Zone', type: 'select' as const, options: [{ value: '', label: 'all' }, ...zoneOptions] },
|
||||
{ name: 'src_ip', label: 'Source IP/CIDR' },
|
||||
{ name: 'dst_ip', label: 'Dest IP/CIDR' },
|
||||
{ name: 'proto', label: 'Protocol' },
|
||||
{ name: 'dport', label: 'Dest Port' },
|
||||
{ name: 'sport', label: 'Source Port' },
|
||||
{ name: 'proto', label: 'Protocol', placeholder: 'e.g. tcp, udp, icmp' },
|
||||
{ name: 'dport', label: 'Dest Port(s)' },
|
||||
{ name: 'sport', label: 'Source Port(s)' },
|
||||
{ name: 'origdest', label: 'Original Dest', placeholder: 'e.g. 192.168.1.1' },
|
||||
{ name: 'rate_limit', label: 'Rate Limit', placeholder: 'e.g. 10/sec:20' },
|
||||
{ name: 'user_group', label: 'User/Group', placeholder: 'e.g. joe:wheel' },
|
||||
{ name: 'mark', label: 'Mark', placeholder: 'e.g. 0x100/0xff0' },
|
||||
{ name: 'connlimit', label: 'ConnLimit', placeholder: 'e.g. 10:24' },
|
||||
{ name: 'time', label: 'Time', placeholder: 'e.g. timestart=09:00×top=17:00' },
|
||||
{ name: 'headers', label: 'Headers (IPv6)', placeholder: 'e.g. auth,esp' },
|
||||
{ name: 'switch_name', label: 'Switch', placeholder: 'e.g. vpn_enabled' },
|
||||
{ name: 'helper', label: 'Helper', type: 'select' as const, options: [
|
||||
{ value: '', label: '(none)' },
|
||||
{ value: 'amanda', label: 'amanda' },
|
||||
{ value: 'ftp', label: 'ftp' },
|
||||
{ value: 'irc', label: 'irc' },
|
||||
{ value: 'netbios-ns', label: 'netbios-ns' },
|
||||
{ value: 'pptp', label: 'pptp' },
|
||||
{ value: 'Q.931', label: 'Q.931' },
|
||||
{ value: 'RAS', label: 'RAS' },
|
||||
{ value: 'sane', label: 'sane' },
|
||||
{ value: 'sip', label: 'sip' },
|
||||
{ value: 'snmp', label: 'snmp' },
|
||||
{ value: 'tftp', label: 'tftp' },
|
||||
]},
|
||||
{ name: 'comment', label: 'Comment' },
|
||||
{ name: 'position', label: 'Position', type: 'number' as const },
|
||||
] as FieldDef[],
|
||||
|
||||
Reference in New Issue
Block a user