Files
dawnline/tests/ucode/fixtures/nft-table.txt
T
Aemeath 18e3013047
Build packages / CI (push) Blocked by required conditions
Build packages / Version (push) Waiting to run
CI / Web (format, types, tests, bundles) (push) Blocked by required conditions
CI / ShellCheck (push) Blocked by required conditions
CI / ucode static checks (push) Blocked by required conditions
CI / ucode compiles and tests pass (OpenWrt 24.10) (push) Blocked by required conditions
CI / ucode compiles and tests pass (OpenWrt 25.12) (push) Blocked by required conditions
Dawnline 0.17.0
- Redraw the admin's charts in the connection map's style: the live speed as lines, the last 30 days and a device's week as stacked download and upload bars, a device's days as a strip, data use as meters.
- Read any chart point by point with the pointer, a tap or the arrow keys; a day's tooltip compares it with the average and shows its download and upload.
- Show where a data limit leads at the recent pace: the week ahead on the meter, and when the limit fills or what a monthly one reaches by the reset.
- Make Speed now live, one point a second, on a person's page, in the People list and in an online person's card.
- Name every place an online person's devices connect from, and the city each device connects from now.
- Portal: read the month and the week by tap or arrow keys, see how a day compares with the others, the pace toward the data limit and how long the allowed hours still run.
- Send VPN clients' DNS to the LAN's DNS after its interceptors, so transparent proxies such as forkop also handle their lookups.
2026-11-02 09:48:31 +03:00

61 lines
3.0 KiB
Plaintext

table inet dawnline {
set home_home { type ipv4_addr; flags interval; auto-merge; elements = { 192.168.1.0/24 } }
set home_work { type ipv4_addr; flags interval; auto-merge; elements = { 192.168.1.0/24 } }
set tun_nets { type ipv4_addr; flags interval; auto-merge; elements = { 10.9.0.0/29, 10.9.1.0/29 } }
set lan_ok { type ipv4_addr; elements = { 10.9.0.2, 10.9.0.3, 10.9.1.3 } }
set lan_all { type ipv4_addr; elements = { 10.9.0.2, 10.9.0.3, 10.9.1.3 } }
set lan_part { type ipv4_addr . ipv4_addr; flags interval; }
set mesh_pairs { type ipv4_addr . ipv4_addr; }
set inet_ok { type ipv4_addr; elements = { 10.9.0.2, 10.9.1.2, 10.9.0.4, 10.9.0.5, 10.9.1.3 } }
set svc_ok { type ipv4_addr . ipv4_addr . inet_service; }
set svc_host { type ipv4_addr . ipv4_addr; }
set dns_real { type ipv4_addr; elements = { 10.9.0.3 } }
chain pre {
type filter hook prerouting priority -160; policy accept;
iifname { "awghome", "awgwork" } jump guard
}
chain guard {
meta nfproto ipv6 drop
ct state related accept
ct status dnat accept
icmp type { echo-request, echo-reply } fib daddr type local accept
fib daddr type local meta l4proto { tcp, udp } th dport 53 accept
fib daddr type local tcp dport { 8443 } accept
fib daddr type local ip saddr @lan_all accept
fib daddr type local ip saddr . ip daddr @lan_part accept
fib daddr type local counter drop
ip daddr 192.168.1.250 meta l4proto { tcp, udp } th dport 53 accept
iifname "awghome" ip daddr @home_home ip daddr != @tun_nets ip saddr @lan_all accept
iifname "awgwork" ip daddr @home_work ip daddr != @tun_nets ip saddr @lan_all accept
ip saddr . ip daddr @lan_part ip daddr != @tun_nets accept
iifname "awghome" ip saddr @lan_ok ip daddr @lan_ok accept
iifname "awgwork" ip saddr . ip daddr @mesh_pairs accept
meta l4proto { tcp, udp } ip saddr . ip daddr . th dport @svc_ok accept
ip saddr . ip daddr @svc_host accept
ip daddr { 10.0.0.0/8, 172.16.0.0/12, 192.168.0.0/16, 100.64.0.0/10, 169.254.0.0/16, 224.0.0.0/3 } counter drop
ip saddr @inet_ok accept
counter drop
}
chain inbound {
type filter hook forward priority filter - 5; policy accept;
oifname { "awghome", "awgwork" } iifname != { "awghome", "awgwork" } ct state new jump to_device
}
chain to_device {
meta nfproto ipv6 drop
ct status dnat accept
oifname "awghome" ip saddr @home_home ip saddr != @tun_nets ip daddr @lan_all accept
oifname "awgwork" ip saddr @home_work ip saddr != @tun_nets ip daddr @lan_all accept
ip daddr . ip saddr @lan_part ip saddr != @tun_nets accept
counter reject with icmpx admin-prohibited
}
chain dns {
type nat hook prerouting priority dstnat - 5; policy accept;
iifname { "awghome", "awgwork" } ip saddr @dns_real meta l4proto { tcp, udp } th dport 53 dnat ip to 169.254.77.2:53
}
chain dns_lan {
type nat hook prerouting priority dstnat + 5; policy accept;
iifname "awghome" ip daddr 10.9.0.1 meta l4proto { tcp, udp } th dport 53 dnat ip to 192.168.1.250:53
iifname "awgwork" ip daddr 10.9.1.1 meta l4proto { tcp, udp } th dport 53 dnat ip to 192.168.1.1:53
}
}