1###
2### Domain with network access
3###
4
5# Use network sockets.
6allow netdomain self:tcp_socket create_stream_socket_perms;
7allow netdomain self:{ udp_socket rawip_socket } create_socket_perms;
8# Connect to ports.
9allow netdomain port_type:tcp_socket name_connect;
10# Bind to ports.
11allow {netdomain -ephemeral_app} node_type:{ tcp_socket udp_socket } node_bind;
12allow {netdomain -ephemeral_app} port_type:udp_socket name_bind;
13allow {netdomain -ephemeral_app} port_type:tcp_socket name_bind;
14# See changes to the routing table.
15allow netdomain self:netlink_route_socket { create read getattr write setattr lock append bind connect getopt setopt shutdown nlmsg_read };
16
17# Talks to netd via dnsproxyd socket.
18unix_socket_connect(netdomain, dnsproxyd, netd)
19
20# Talks to netd via fwmarkd socket.
21unix_socket_connect(netdomain, fwmarkd, netd)
22
23# Connect to mdnsd via mdnsd socket.
24unix_socket_connect(netdomain, mdnsd, mdnsd)
25