xref: /aosp_15_r20/external/iptables/extensions/libebt_ip.txlate (revision a71a954618bbadd4a345637e5edcf36eec826889)
1ebtables-translate -A FORWARD -p ip --ip-src ! 192.168.0.0/24 -j ACCEPT
2nft 'add rule bridge filter FORWARD ip saddr != 192.168.0.0/24 counter accept'
3
4ebtables-translate -I FORWARD -p ip --ip-dst 10.0.0.1
5nft 'insert rule bridge filter FORWARD ip daddr 10.0.0.1 counter'
6
7ebtables-translate -I OUTPUT -p ip -o eth0 --ip-tos 0xff
8nft 'insert rule bridge filter OUTPUT oifname "eth0" ether type ip @nh,8,8 0xff counter'
9
10ebtables-translate -A FORWARD -p ip --ip-proto tcp --ip-dport 22
11nft 'add rule bridge filter FORWARD ether type ip tcp dport 22 counter'
12
13ebtables-translate -A FORWARD -p ip --ip-proto udp --ip-sport 1024:65535
14nft 'add rule bridge filter FORWARD ether type ip udp sport 1024-65535 counter'
15
16ebtables-translate -A FORWARD -p ip --ip-proto 253
17nft 'add rule bridge filter FORWARD ip protocol 253 counter'
18
19ebtables-translate -A FORWARD -p ip --ip-protocol icmp --ip-icmp-type "echo-request"
20nft 'add rule bridge filter FORWARD icmp type 8 counter'
21
22ebtables-translate -A FORWARD -p ip --ip-proto icmp --ip-icmp-type 1/1
23nft 'add rule bridge filter FORWARD icmp type 1 icmp code 1 counter'
24
25ebtables-translate -A FORWARD -p ip --ip-protocol icmp --ip-icmp-type ! 1:10
26nft 'add rule bridge filter FORWARD icmp type != 1-10 counter'
27