mirror of
https://github.com/google/nsjail.git
synced 2026-08-30 18:41:30 -07:00
48 lines
704 B
INI
48 lines
704 B
INI
# Test: Mixed IPv4 and IPv6 traffic rules using the unified traffic_rule field
|
|
|
|
name: "traffic-mixed"
|
|
|
|
description: "Tests a combination of IPv4 and IPv6 traffic rules in a single config,"
|
|
description: "verifying the unified ip_family field works for both address families."
|
|
|
|
mode: ONCE
|
|
|
|
skip_setsid: true
|
|
mount_proc: true
|
|
|
|
mount {
|
|
src: "/"
|
|
dst: "/"
|
|
is_bind: true
|
|
}
|
|
|
|
user_net { }
|
|
|
|
# IPv4: reject TCP port 443
|
|
traffic_rule {
|
|
proto: TCP
|
|
dport: 443
|
|
action: REJECT
|
|
}
|
|
|
|
# IPv6: drop UDP port 53
|
|
traffic_rule {
|
|
ip_family: IPV6
|
|
proto: UDP
|
|
dport: 53
|
|
action: DROP
|
|
}
|
|
|
|
# IPv4: allow TCP port 80
|
|
traffic_rule {
|
|
proto: TCP
|
|
dport: 80
|
|
action: ALLOW
|
|
}
|
|
|
|
exec_bin {
|
|
path: "/bin/bash"
|
|
arg0: "sh"
|
|
arg: "-i"
|
|
}
|