nuttx-apps/system
Zhe Weng 8ae06462eb system/iptables: Support filter table
Add supports for filter table, usage is same as Linux's iptables, including:
- [!] -p/--protocol
- [!] -s/--source -d/--destination
- [!] -i/--in-interface -o/--out-interface
- [!] --sport/--source-port --dport/--destination-port
- [!] --icmp-type

Examples:
> iptables -P FORWARD DROP
> iptables -I INPUT -i eth0 ! -p icmp -j DROP
> iptables -t filter -A FORWARD -p tcp -s 10.0.1.2/24 -d 10.0.3.4/24 -i eth0 -o eth1 --sport 3000:3200 --dport 123:65535 -j ACCEPT
> iptables -t filter -I FORWARD 2 -p icmp ! -s 123.123.123.123 ! -i eth0 -o eth1 ! --icmp-type 255 -j REJECT

> iptables -L
Chain INPUT (policy ACCEPT)
target        prot  idev  odev  source              destination
DROP         !icmp  eth0  any   anywhere            anywhere

Chain FORWARD (policy DROP)
target        prot  idev  odev  source              destination
ACCEPT        tcp   eth0  eth1  10.0.1.2/24         10.0.3.4/24        tcp spts:3000:3200 dpts:123:65535
REJECT        icmp !eth0  eth1 !123.123.123.123/32  anywhere           icmp !type 255

Chain OUTPUT (policy ACCEPT)
target        prot  idev  odev  source              destination

Note:
- We're dropping dependency of argtable3, since it is difficult to support command like '! -p tcp ! -i eth0'

Signed-off-by: Zhe Weng <wengzhe@xiaomi.com>
2024-06-21 10:16:01 +08:00
..
adb Fix Error: logcat_service.c:69:11: error: variable 'ret' set but not used 2024-05-21 08:54:56 +08:00
argtable3 cmake:replace custom_patch_target with PATCH_COMMAND 2023-08-24 17:49:12 +02:00
cdcacm remove system/xxx/README.md. Migrated to Documentation/applications/system 2023-10-30 10:00:01 +08:00
cfgdata remove system/xxx/README.md. Migrated to Documentation/applications/system 2023-10-30 10:00:01 +08:00
cle system: use fileno to get stream file descriptor 2023-10-10 01:03:42 +08:00
composite remove system/xxx/README.md. Migrated to Documentation/applications/system 2023-10-30 10:00:01 +08:00
conntrack apps/system: Add conntrack command 2024-04-18 09:57:01 +08:00
coredump coredump:support coredump command restore coredump form block device 2023-12-08 19:28:09 -08:00
critmon add initial cmake build system 2023-07-08 13:52:02 +08:00
cu system/cu: Remove the dependence on stdio FILE * function 2023-09-06 14:29:34 +02:00
dd system: dd: add standalone dd command 2023-08-09 20:59:40 +08:00
dhcp6c fix nxstyle 2024-05-11 01:20:08 +08:00
dhcpc add initial cmake build system 2023-07-08 13:52:02 +08:00
dumpstack Wrong start and end values would make dead cycle. Exchange the values when start value is bigger than end value. 2023-08-16 20:20:03 +03:00
fastboot system/fastboot: Fix command comparation 2023-09-12 16:26:09 +08:00
fdt libfdt: modify makefile 2023-08-26 17:06:55 +08:00
flash_eraseall remove system/xxx/README.md. Migrated to Documentation/applications/system 2023-10-30 10:00:01 +08:00
gcov system/gcov: add show usage 2022-09-27 19:39:31 +08:00
gdbstub gdbstub:update gdb_process api 2023-12-11 08:43:34 -08:00
hex2bin c++ compatibility: rename usages of reserved c++ keywords 'this' and 'public' 2023-09-16 19:45:52 +08:00
hexed Fix nuttx coding style 2024-04-18 09:56:48 +08:00
hostname add initial cmake build system 2023-07-08 13:52:02 +08:00
i2c remove system/xxx/README.md. Migrated to Documentation/applications/system 2023-10-30 10:00:01 +08:00
input apps: Use MIN/MAX definitions from "sys/param.h" 2023-02-02 00:35:14 +02:00
iptables system/iptables: Support filter table 2024-06-21 10:16:01 +08:00
libuv remove system/xxx/README.md. Migrated to Documentation/applications/system 2023-10-30 10:00:01 +08:00
lm75 sensor/lm75: fix C syntax error 2024-02-25 10:38:51 -05:00
lzf add initial cmake build system 2023-07-08 13:52:02 +08:00
mdio add initial cmake build system 2023-07-08 13:52:02 +08:00
netdb add initial cmake build system 2023-07-08 13:52:02 +08:00
nsh remove system/xxx/README.md. Migrated to Documentation/applications/system 2023-10-30 10:00:01 +08:00
ntpc system/ntpc/Kconfig: cosmetcis 2023-10-23 22:26:13 +08:00
nxcamera system/readline: correct the readline(3) prototype 2023-10-16 22:04:18 +08:00
nxdiag system/nxdiag: Remove unnecessary --depth parameter 2024-05-23 11:49:08 +08:00
nxlooper system/readline: correct the readline(3) prototype 2023-10-16 22:04:18 +08:00
nxplayer remove system/xxx/README.md. Migrated to Documentation/applications/system 2023-10-30 10:00:01 +08:00
nxrecorder system/nxrecorder: add amr offload record support 2023-10-27 21:00:59 +08:00
ofloader ofloader: startup ofloader directly 2023-08-14 13:39:42 +08:00
ping net/ip: print ip addresses using ip4_addrN macro 2023-08-22 01:36:42 +08:00
ping6 add initial cmake build system 2023-07-08 13:52:02 +08:00
popen system/popen: popen should depends on pipe() 2023-11-15 08:27:28 -08:00
psmq remove system/xxx/README.md. Migrated to Documentation/applications/system 2023-10-30 10:00:01 +08:00
ptpd ptpd: Fix reserved word 'class' 2023-12-07 18:26:39 -08:00
readline system/readline: correct the readline(3) prototype 2023-10-16 22:04:18 +08:00
sched_note add initial cmake build system 2023-07-08 13:52:02 +08:00
sensorscope system: add sensor streaming tool based on nxscope 2024-05-23 11:50:08 +08:00
setlogmask setlogmask: fix uncloseed handle 2023-08-28 17:09:18 +03:00
settings Add Settings Utility and example app 2024-03-03 02:36:56 +08:00
spi system/spi: Set SPI delay characteristics to zero when enabled. 2024-05-17 19:01:20 +08:00
stackmonitor Revert "fix progname do not match issue" 2023-10-10 01:02:50 +08:00
system add initial cmake build system 2023-07-08 13:52:02 +08:00
taskset Fix compiler errors 2024-05-22 19:09:22 +08:00
tcpdump apps/tcpdump: Support capture RAW IP interfaces like TUN 2024-02-22 21:22:00 -08:00
tee add initial cmake build system 2023-07-08 13:52:02 +08:00
telnet add initial cmake build system 2023-07-08 13:52:02 +08:00
telnetd telnetd/Kconfig: cosmetic change 2023-05-13 10:15:02 -03:00
termcurses remove system/xxx/README.md. Migrated to Documentation/applications/system 2023-10-30 10:00:01 +08:00
trace remove system/xxx/README.md. Migrated to Documentation/applications/system 2023-10-30 10:00:01 +08:00
ubloxmodem Change all sizeof(arr)/sizeof(arr[0]) to nitems 2023-08-17 22:51:51 +03:00
uniqueid Replace all sprintf with snprintf 2023-05-08 21:35:16 +03:00
uorb Remove @ tag from all comments 2024-01-04 10:26:49 +01:00
usbmsc remove system/xxx/README.md. Migrated to Documentation/applications/system 2023-10-30 10:00:01 +08:00
vi add initial cmake build system 2023-07-08 13:52:02 +08:00
ymodem remove system/xxx/README.md. Migrated to Documentation/applications/system 2023-10-30 10:00:01 +08:00
zlib Fix Kconfig style 2023-11-16 20:31:08 -08:00
zmodem remove system/xxx/README.md. Migrated to Documentation/applications/system 2023-10-30 10:00:01 +08:00
.gitignore Remove extra whitespace from files (#43) 2020-01-31 08:29:24 -06:00
CMakeLists.txt add initial cmake build system 2023-07-08 13:52:02 +08:00
Make.defs Makefiles: Gregory Nutt: update licenses to Apache 2021-06-07 21:35:33 -05:00
Makefile Makefiles: Gregory Nutt: update licenses to Apache 2021-06-07 21:35:33 -05:00