# Routing Selected Traffic with Packet Marks — Technical Proposal November 15, 2026. Separate from the approved prose. This is a command-by-command design for review, not a tested installation script. No Linux networking commands have been executed. Platform, reader, and VPN-client validation remain necessary. ## 1. Define What We Are Selecting Use a Usenet reader running under a dedicated, unprivileged Linux account named `newsvpn`. All IPv4 network connections owned by that account must use the VPN. Other accounts retain their normal routing. The account must not run the VPN client, a general browser, or unrelated services. Give the reader account its own configuration and only the file permissions it needs, including access to its download location. It should have no administrative privileges. Continue administering the host through your normal account; running the reader under a separate identity does not require a second desktop login. Resolve and verify the account's actual numeric UID rather than assuming a particular number. The account provides a selection boundary. It does not establish a VPN or force its traffic through one by itself. Routing selects the path, and the independent firewall guard restricts which paths the account may use. This selects a socket owner, not an executable name or an NNTP port. It covers the reader's other connections only if they use the same account. The [owner match](https://man7.org/linux/man-pages/man8/iptables-extensions.8.html) is not a process-name detector. Helpers using another account, inherited sockets, proxies, and shared resolver services need separate investigation. This is a policy for cooperative software, not containment of a malicious or privileged application. The current account-guard commands provide no direct LAN or loopback IP exception. Your ordinary account can still reach the printer. A local DNS stub will need a narrowly scoped allowance if used by the dedicated DNS design in Section 8; a broad loopback exception could also admit a local proxy. Unix-domain IPC is outside these IP rules. An approved shared resolver must enforce the independent DNS policy on its own outbound traffic; other delegated networking still needs separate review. If UID is the only criterion, a direct `ip rule uidrange` selector may be simpler. This article deliberately demonstrates the classification → mark → policy-rule sequence. Do not install both selection methods for the same test; that would mask a missing marking rule. See [ip-rule selectors](https://man7.org/linux/man-pages/man8/ip-rule.8.html). ## 2. Example Values and Prerequisites | Item | Example | | --- | --- | | Physical host address | `192.168.50.10/24` on `eth0` | | Direct gateway | `192.168.50.1` | | Working point-to-point VPN | `tun0`, local address `10.8.0.2` | | VPN server's public endpoint | `198.51.100.20` | | News server | `news.example`, IPv4 address `203.0.113.10`, implicit TLS port `563` | | Test-only HTTPS endpoint | `vpn-test.example`, `203.0.113.80` | | Dedicated table | `101` | | Rule priority | `10100` | | Dedicated packet-mark value | `0x100` | | Account | Existing dedicated account `newsvpn`; discover its actual numeric UID | Replace documentation addresses and names consistently with real, permitted test endpoints. Do not assume UID `1000` or any other fixed user number. Account provisioning and the reader's launch command depend on the chosen distribution and client; an unrelated desktop session must not be repurposed as this account. The VPN already provides Internet access and return routing for its local address. It leaves the host's direct route usable. Its own transport runs under another account and must continue using the direct path. This example uses fixed tunnel addressing and no host forwarding. An interface or address change requires revalidation. Run this as a separate lab scenario from the preceding destination-based example. Table `101` keeps ownership distinct, but does not cancel earlier routing or firewall rules. In particular, the earlier `split-vpn-guard` could block an ordinary account's direct test, and its destination selector could hide failure of the mark selector. Review and deliberately withdraw only prior example-owned settings, with protected applications stopped, or use a fresh test host. Never flush the host configuration to obtain a clean-looking example. > [!IMPORTANT] > Keep independent recovery access. Stop the reader and its helpers before setup. Establish the account's IPv4 and IPv6 protection before starting any test under that account. Verify normal connections and failure behavior before using the reader for real activity. Leave the guards installed if setup fails. ## 3. Inspect and Record the Starting State Run these in the same administrative shell for the walkthrough. `NEWS_UID` is used in later commands; confirm it is the intended non-root account before continuing. ```bash NEWS_UID=$(id -u newsvpn) id newsvpn printf '%s\n' "$NEWS_UID" uname -r ip -V iptables -V ip6tables -V ip -4 addr show dev eth0 ip -4 addr show dev tun0 ip -4 rule show ip -4 route show table all sudo iptables-save sudo ip6tables-save sysctl net.ipv4.conf.all.rp_filter net.ipv4.conf.tun0.rp_filter ``` Stop if the account lookup fails, the UID is empty or zero, or any other prerequisite is wrong. Confirm table `101`, priority `10100`, the chosen mark value, and the proposed rule comments are unused in both running and persistent configuration. Review other mark writers, routing rules, NAT, and firewall managers. This example assigns the complete packet mark: confirm the selected traffic does not depend on another mark that would be overwritten. Later rules must not change this mark or override its routing result. Record the original per-interface reverse-path-filter value for recovery. Store the baseline securely; firewall listings can contain information about your network. These commands inspect state, not back it up automatically. ## 4. Install Independent Account Guards The IPv4 guard uses the account directly. It does not depend on the packet receiving a mark: ```bash sudo iptables -w -I OUTPUT 1 -m owner --uid-owner "$NEWS_UID" ! -o tun0 -m comment --comment newsvpn-guard4 -j DROP sudo ip6tables -w -I OUTPUT 1 -m owner --uid-owner "$NEWS_UID" -m comment --comment newsvpn-guard6 -j DROP sudo iptables -w -S OUTPUT sudo ip6tables -w -S OUTPUT ``` Read the IPv4 rule as: if this account owns the outgoing traffic and the selected output interface is not `tun0`, drop it. | Component | Responsibility | | --- | --- | | Packet mark and routing rule | Select the VPN path | | Account-based firewall guard | Prevent another path from being used | If the marking rule disappears, the guard still recognizes the account. If routing falls back to a direct interface, the guard blocks that output. This separation is why the guard matches the UID rather than depending on the same mark used for routing. The guard does not establish the VPN, verify tunnel health, or explicitly allow traffic through it. It recognizes the output interface, not whether encryption is working. Traffic selected for `tun0` still has to satisfy the remaining firewall rules. Keep the actual VPN interface and configuration under the administrator's control. The IPv6 rule deliberately blocks all IPv6 output from this account. This is an IPv4-only reader example, not a claim to route IPv6 through the VPN. If the IPv6 guard cannot be installed, stop; do not start the reader with an unexplained gap. Verify both guards precede broad accept rules, including established-connection accepts. Install and verify both guards before starting the reader. The tradeoff is that the reader account also loses direct LAN and loopback IP access. A local DNS stub or a browser-based reader interface may therefore need a separately reviewed, narrowly scoped arrangement. Your ordinary account retains its existing access; do not add a broad exception merely to make a helper service work. For repeated runs, inspect first and use the same rule specification with `-C OUTPUT` to check an existing guard. Reuse an exact, correctly placed rule; do not insert duplicates. An unsuccessful check can also indicate a permissions or backend problem. The [iptables manual](https://man7.org/linux/man-pages/man8/iptables.8.html) describes the check, insert, and delete operations. ## 5. Build the VPN Table ```bash sudo ip -4 route add unreachable default metric 32767 table 101 sudo ip -4 route add default dev tun0 src 10.8.0.2 metric 100 table 101 ip -4 route show table 101 ``` This table differs from the destination example: it has a usable VPN default, because the account can contact more than one destination. Both entries are defaults; the lower metric selects the usable route. If that route is removed, the unreachable route terminates the lookup. Retain `unreachable` as the primary example; the previous review explains `blackhole` as an alternative. See [route types, metrics, and source selection](https://man7.org/linux/man-pages/man8/ip-route.8.html). The table's `src` is a preferred source for route selection, not a source-address rewrite. An ordinary unmarked local connection can initially choose `192.168.50.10` before `mangle`/`OUTPUT` changes its mark. We address that explicitly next. ## 6. Account for the Source and Return Path Routing chooses the VPN path. Source translation gives the outgoing packet an address that the VPN can carry and return traffic to. A reader connection may initially select the host's ordinary address, `192.168.50.10`. Marking it with `0x100` can redirect it through `tun0`, but that does not automatically replace an existing source address with `10.8.0.2`. For this fixed-address example, add scoped SNAT for the exact mark value, physical source address, and VPN output interface: ```bash sudo iptables -w -t nat -I POSTROUTING 1 -s 192.168.50.10/32 -o tun0 -m mark --mark 0x100 -m comment --comment newsvpn-snat -j SNAT --to-source 10.8.0.2 sudo iptables -w -t nat -S POSTROUTING ``` The rule applies only when all three conditions match: source `192.168.50.10`, output interface `tun0`, and the complete packet mark `0x100`. It changes the source to `10.8.0.2`, the local tunnel address. The mark value is reserved exclusively for this policy, so the rule does not translate other accounts' ordinary unmarked traffic. Review existing NAT before inserting it. SNAT takes place in `POSTROUTING`, after route selection. See the [Netfilter NAT documentation](https://www.netfilter.org/documentation/HOWTO/NAT-HOWTO-6.html). | Stage | Address Handling | | --- | --- | | Reader creates the connection | Original source: `192.168.50.10` | | Packet leaves through the VPN | SNAT changes its source to `10.8.0.2` | | Matching reply returns through the tunnel | Connection tracking reverses the translation and delivers it to the original local connection | A separate manually written DNAT rule is not needed for those replies. The VPN's remote side must already provide the necessary onward and return routing; this local rule does not configure the remote side. The tunnel address `10.8.0.2` is not necessarily the public address seen by the news server. SNAT is appropriate here because of the example's initial source selection. It is not a universal requirement for every VPN configuration. Use fresh connections when testing. NAT decisions persist for a tracked connection, so removing or changing the rule does not retrofit an existing session. Do not clear the entire conntrack table. If a fresh reader connection has an unexpected source, stop and investigate instead of widening the rule indiscriminately. Dynamically addressed tunnels would need a separately reviewed approach, such as scoped MASQUERADE and reconnect handling. See [Netfilter's connection-tracking explanation](https://www.netfilter.org/documentation/HOWTO/NAT-HOWTO-5.html). Reverse-path filtering is a separate check. Strict mode can reject a legitimate reply arriving through `tun0` because the host's unmarked route back to its sender points through `eth0`. For this asymmetric example, use loose checking on `tun0`: ```bash sudo sysctl -w net.ipv4.conf.tun0.rp_filter=2 sysctl net.ipv4.conf.all.rp_filter net.ipv4.conf.tun0.rp_filter ``` Do this only after recording the original value and checking the host's policy. Loose checking still requires a route to the source, but does not require it to use the receiving interface. Linux uses the maximum of `all` and the interface value. This does not disable filtering globally; it is a specific tradeoff for this example. A recreated interface needs its policy reapplied. See [kernel IP sysctl documentation](https://docs.kernel.org/networking/ip-sysctl.html). The existing firewall must also admit the expected reply traffic. A zero-error command sequence does not settle that policy. ## 7. Connect Classification to Routing First install the consumer of the mark, then the marking rule, with the reader still stopped: ```bash sudo ip -4 rule add priority 10100 fwmark 0x100 lookup 101 sudo iptables -w -t mangle -A OUTPUT -m owner --uid-owner "$NEWS_UID" -m comment --comment newsvpn-mark -j MARK --set-mark 0x100 ip -4 rule show sudo iptables -w -t mangle -S OUTPUT ``` Use `--set-mark 0x100` to assign one complete mark value. The routing selector `fwmark 0x100` and the NAT selector `--mark 0x100` both match that exact value. No explicit bitmask is needed for this example. Assigning the complete value replaces any previous packet mark, so the preflight check must confirm that the selected traffic does not need another marking policy. See the [MARK documentation](https://man7.org/linux/man-pages/man8/iptables-extensions.8.html). Placing classification after existing mangle rules avoids an earlier writer undoing it, but a pre-existing terminal verdict can make an appended rule unreachable. Verify the actual chain, counter activity, and final route. Do not assume append order alone proves correct placement. For local traffic, the kernel's [mangle OUTPUT handling](https://github.com/torvalds/linux/blob/master/net/ipv4/netfilter/iptable_mangle.c) can reconsider the route after a mark change. No `PREROUTING` marking is needed for this host-originated example. There is no CONNMARK save/restore in the initial design. Account-owned outbound packets are classified as they traverse OUTPUT. We do not need to give inbound replies the outbound routing mark, and we have explicitly addressed reverse-path checking. This simplification must be checked with the selected reader and socket behavior rather than extended to every application. ## 8. Give DNS Its Own Routing Policy DNS routing is a separate user-controlled policy. The user chooses its scope, the resolver, the route used to reach it, and the permitted behavior when that route is unavailable. Applications do not get to override that policy. The reader's UID and packet mark control its application traffic; they do not by themselves implement the DNS policy. Develop three alternative split-gateway examples. Application connections remain split between VPN and direct paths in all three; the DNS policy is what changes. Choosing a resolver and choosing its network path are distinct decisions. No example should silently substitute another provider or route. | DNS Policy | VPN-Related Lookups | Other Lookups | VPN Unavailable | | --- | --- | --- | --- | | 1. DNS follows the application routing policy | VPN provider's DNS through the VPN | Designated non-VPN DNS path | VPN-related lookups fail; other lookups retain their normal path | | 2. All DNS through the VPN | Chosen resolver through the VPN | Chosen resolver through the VPN | New external lookups fail for the whole host; no direct fallback | | 3. All DNS outside the VPN | Designated provider through the direct path | Designated provider through the direct path | DNS remains available if the direct path and provider are available | These paths describe upstream DNS requests. Local cache hits need no new upstream request. In every case, application traffic assigned to the VPN remains subject to its independent VPN-only guard. ### Example 1: VPN DNS for VPN-Routed Applications The separate [Example 1 command proposal](DNS-EXAMPLE-1-TECHNICAL-REVIEW.md) now describes private resolver files for the reader's launch environment, direct library DNS under the existing account policy, destination restrictions, and verification. It proposes a mount namespace rather than a network namespace or shared local stub. These are review commands, not an implemented or Linux-tested configuration. The approved article prose is unchanged. Use the VPN provider's resolver for applications assigned to the VPN, while the VPN is in use. The user explicitly selected application-scoped behavior: other applications keep their normal DNS policy. Do not switch the whole host to the VPN resolver merely because the tunnel connects. Use case: keep VPN-selected application traffic and its related DNS requests on the VPN path, reducing exposure of those lookups to the ISP. The aim is privacy for the selected activity; the VPN and its DNS provider remain trust parties rather than a guarantee of anonymity. | State | VPN-Routed Applications | Other Applications | | --- | --- | --- | | VPN ready | Use the VPN provider's DNS through the tunnel | Keep their configured non-VPN DNS policy | | VPN fails unexpectedly | No direct DNS fallback; VPN-required application traffic remains blocked | Keep their configured DNS policy | | VPN intentionally disconnected | VPN DNS is inactive; the example reader remains VPN-only and blocked until the tunnel returns | Keep their configured DNS policy | Allowing the reader to operate directly after a deliberate disconnect would be a separate user-selected mode, not an automatic consequence of tunnel loss. The existing account guard continues to enforce VPN-only use. The implementation must preserve the selected application group's DNS context. One undifferentiated shared resolver path cannot simply be assumed to retain that distinction. Evaluate a separate resolver instance or view with an explicit client boundary, or an isolated application environment with its own resolver configuration. A rule based only on the queried domain does not distinguish two applications looking up the same name. Once requests enter the designated resolver context, its upstream route and guard enforce the DNS policy independently of the requesting application's identity. A [network namespace can provide separate network configuration](https://man7.org/linux/man-pages/man8/ip-netns.8.html), but its resolver and local-IPC integration still require deliberate configuration. This example deliberately trusts the VPN provider's DNS service. Obtain its actual supported resolver addresses from the VPN configuration or provider documentation; do not invent a universal VPN DNS address. ### Example 2: All DNS Through the VPN Example 2 now has a [simplified prose draft](DNS-EXAMPLE-2-PROSE-REVIEW.md) and a separate [routing and firewall command proposal](DNS-EXAMPLE-2-TECHNICAL-REVIEW.md). It keeps the existing DNS setup, routes the chosen provider through the VPN, and blocks upstream DNS fallback. It requires no new service, DNS packet mark, or separate DNS table. The commands remain under review and have not been run on Linux. Route all upstream DNS requests through the VPN, including lookups for applications whose subsequent connections use the direct Internet path. Use the VPN provider's resolver or another explicitly chosen resolver reachable through the tunnel. The defining requirement is that every approved upstream DNS path uses the VPN. Use case: hide the host's DNS query contents from the ISP's direct observation, rather than protecting only the VPN-selected applications' lookups. This does not conceal the destinations of ordinary direct application connections, and it does not guarantee anonymity from the VPN provider or resolver. See [DNS privacy considerations](https://www.rfc-editor.org/rfc/rfc9076.html). If the VPN is down, new external lookups must fail rather than use direct DNS. This applies after both an unexpected failure and an intentional disconnect unless the user explicitly selects a different DNS policy. Cached names, local mappings, and established connections can still work. Provide an explicit VPN-startup mechanism that does not require an undocumented direct DNS exception. ### Example 3: All DNS Outside the VPN Choose a provider and keep all upstream DNS requests on the direct, non-VPN path to that provider, whether or not the VPN is active. This includes lookups made for VPN-routed applications. Use case: retain a consistent, user-controlled resolver and DNS route regardless of which path carries an application's connection. For concrete IPv4 examples, Cloudflare documents `1.1.1.1` and `1.0.0.1`; Google documents `8.8.8.8` and `8.8.4.4`. Select one provider's intended endpoint set rather than mixing providers as an accidental fallback. These are examples, not configured settings or provider endorsements. See [Cloudflare's endpoint list](https://developers.cloudflare.com/1.1.1.1/ip-addresses/) and [Google Public DNS configuration](https://developers.google.com/speed/public-dns/docs/using). The VPN client must not replace that resolver choice or move its traffic into the tunnel. Direct DNS is intentional in this example. If the designated direct DNS path fails, do not silently substitute VPN DNS. The route is now settled as non-VPN; exact endpoints and implementation remain to be selected. Non-VPN DNS does not have to be unencrypted. DNS over TLS or DNS over HTTPS to the designated provider can protect query contents on the direct path, while ordinary plaintext DNS exposes them to observers on that path. Encryption does not hide queries from the resolver itself. See [encrypted DNS transports](https://developers.cloudflare.com/1.1.1.1/encryption/). Provider selection gives control over which service answers; it does not give control over that provider's internal operations or logs. Apply this provider policy across the host's DNS sources, including shared resolver services. Additional addresses belonging to the chosen provider can provide redundancy; a different provider needs explicit authorization in the policy. If no approved endpoint/path is available, new lookups fail instead of silently switching providers. The chosen provider remains a trust party even if the transport is encrypted. ### Connections to Existing DNS Articles The prototype now has a [DNS routing review page](../relearn-prototype/public/review/vpn-dns-routing/index.html) connecting these three policies to the existing DNS content. Both linked articles point back to that review page: - [What Is a Dedicated DNS?](../relearn-prototype/public/reference/networking/dns-dedicated-dynamic-smart/index.html#dedicated-dns) directly supports the discussion of the resolver used in Examples 1 and 2; resolver choice and query routing must be distinguished. - [Combining DNS Services with a VPN](../relearn-prototype/public/reference/networking/dns-dedicated-dynamic-smart/index.html#vpn-combo) provides the broader DNS/VPN context for all three examples. - [Combining a VPN and Smart DNS](../relearn-prototype/public/tutorials/networking/vpn/vpn-and-smart-dns/index.html) connects to the direct-versus-VPN routing choices, especially Example 3. Smart DNS is not required for that example. Existing absolute privacy claims in the DNS articles remain separate technical-review work. Cross-references do not approve those claims. The new Policy Routing and Packet Marks articles remain standalone drafts; no unpublished article URL has been added to the prototype. ### Make the Trust Choice Explicit A VPN service may provide DNS through its tunnel to keep those lookups away from observers on the local network or ordinary Internet access path. That does not make the queries anonymous to every participant. The user is placing trust in the VPN provider and the resolver handling the requests; a provider-operated resolver may be able to associate lookups with a VPN session or account. Visibility and actual logging are different questions, and provider claims need provider-specific evidence. Using the VPN provider's resolver is an acceptable design choice when the user understands that trust relationship. It is not a guarantee of anonymity. Choosing an independent resolver through the VPN changes the parties involved but does not remove the need to trust them. If that upstream DNS leg is unencrypted, the VPN exit operator may also observe the queries. ### Enforce the Chosen Policy Independently The next DNS command proposal must implement the following, separately from the reader's marking rule: 1. Configure the approved resolver endpoint or endpoints, scope, and intended route. In Example 1, keep VPN and ordinary application lookups in separate contexts. In Example 2, enforce VPN-only upstream DNS for the whole host. In Example 3, enforce direct-only upstream DNS to the designated provider for the whole host. Include shared resolver services in each policy. 2. Block unauthorized ordinary DNS destinations and disallowed paths. Cover both UDP and TCP DNS, and define IPv6 and encrypted-DNS handling explicitly. A route to the preferred resolver alone does not stop an application contacting another one. 3. If a local stub is used, allow only the required local DNS access before the reader's general guard. Constrain the stub's upstream traffic to the approved resolver and route. In Example 3, this can let the reader ask an approved local resolver while that resolver sends DNS directly, without broadly permitting the reader's own direct network traffic. The current guard commands do not yet include this exception. A [shared resolver can accept requests through IP or local IPC](https://www.freedesktop.org/software/systemd/man/latest/systemd-resolved.service.html); enforcement must cover its upstream connections rather than relying on how the request arrived. 4. Give that DNS traffic a working source and return path. The reader's existing SNAT rule matches mark `0x100`; it must not be assumed to translate an unmarked shared resolver's traffic. Review a separate, scoped DNS routing/NAT arrangement where needed. 5. Handle tunnel startup without a circular dependency. If the VPN endpoint itself needs DNS before the tunnel exists, define an explicit bootstrap mechanism, such as provisioned endpoint addresses, rather than allowing an undocumented direct fallback. 6. Test cold-cache lookups for the same hostname from the reader and an ordinary application, resolver-service traffic, unauthorized resolver attempts, VPN loss, and reconnection. In Example 1, verify the two distinct DNS paths and their failure behavior. In Example 2, verify that all upstream queries use the VPN and fail when it is unavailable. In Example 3, verify that all upstream queries remain direct even while the VPN is active, and that direct-DNS failure does not trigger VPN fallback. Cached names and existing connections may continue working. Applications that require a conflicting private resolver or refuse the user's DNS policy are outside the supported setup. Do not silently add exceptions or redirect every query to make such an application work. This is an intentional compatibility choice, not a claim that private DNS itself is inherently malformed. Ordinary DNS port rules do not identify every DNS request hidden inside allowed HTTPS. [DNS over HTTPS](https://www.rfc-editor.org/rfc/rfc8484.html) therefore needs an explicit policy: approved endpoints, application configuration, and enforcement appropriate to the host. Do not claim universal DNS enforcement from port-53 rules alone. ### Implementation Status This section records the three requested examples and requirements. Example 1's resolver approach, firewall rules, and verification procedure are approved, but have not been run on Linux. Example 2 now has separate tutorial prose and routing/firewall commands using the existing DNS setup; they supersede the earlier service-centered proposal and remain untested on Linux. Example 3 remains design-only. The existing reader-guard commands alone do not implement any of these DNS policies. Actual endpoints, resolver/application compatibility, VPN-manager behavior, and persistent startup integration still need validation before presenting a combined recipe as complete. Pinned-address TLS tests remain useful for isolating routing and source translation. They are diagnostic tests, not the proposed long-term DNS design. Keep hostname and certificate validation enabled. ## 9. Verify the Route, Source, and Application The route lookup below supplies a mark manually. It verifies the policy-rule/table combination; it does not prove that the reader receives a mark: ```bash ip -4 route get 203.0.113.10 mark 0x100 ip -4 route get 203.0.113.10 ip -4 route get 198.51.100.20 ip -4 route get 192.168.50.25 sudo iptables -w -t mangle -L OUTPUT -n -v --line-numbers sudo iptables -w -t nat -L POSTROUTING -n -v --line-numbers sudo iptables -w -L OUTPUT -n -v --line-numbers sudo ip6tables -w -L OUTPUT -n -v --line-numbers ``` Expect the marked lookup to use table `101` and `tun0`; the unmarked lookup should use the direct route. The VPN endpoint and the ordinary account's printer connection must remain direct/local. These lookups do not execute firewall rules or demonstrate SNAT. With real replacement values, test an NNTP TLS handshake under the selected account without DNS or account credentials: ```bash sudo -u newsvpn -- openssl s_client -4 -connect 203.0.113.10:563 -servername news.example -verify_hostname news.example -verify_return_error ``` Verify certificate trust and hostname, inspect the server greeting, then close the session. Use the appropriate trusted CA configuration for the platform. This tests transport, not authentication or the reader's full behavior. Do not put news-provider passwords in command arguments or audit transcripts. [OpenSSL documents these verification options](https://docs.openssl.org/3.5/man1/openssl-s_client/). For a controlled HTTPS endpoint that reports the observed source address, compare the two accounts: ```bash sudo -u newsvpn -- curl -4 --noproxy '*' --connect-timeout 5 --max-time 15 --resolve vpn-test.example:443:203.0.113.80 https://vpn-test.example/ curl -4 --noproxy '*' --connect-timeout 5 --max-time 15 --resolve vpn-test.example:443:203.0.113.80 https://vpn-test.example/ ``` The first should report the VPN exit; the second should report the ordinary exit. Replace both name and IP with a permitted endpoint and keep certificate verification enabled. This pinned-address test deliberately excludes DNS. See [curl's resolve option](https://curl.se/docs/manpage.html#--resolve). Inspect captures on `tun0` and `eth0` during selected-account tests: selected inner traffic should leave through the tunnel with the expected source, while only encrypted VPN transport should carry it on the physical path. NAT counters describe new tracked connections, not every packet. Record counter differences rather than resetting shared counters. Finally launch the chosen reader under `newsvpn` using its documented command and dedicated configuration. Confirm the actual socket owner, helper accounts, TLS validation, name resolution, authentication, and an authorized read/download. Test posting separately only if needed, using an appropriate test group and provider permission. A working OpenSSL or curl test is not proof that the reader is correctly configured. Neither a sample credential nor an invented reader-launch command is supplied here. ## 10. Failure Tests Run one fault at a time in the isolated environment, restoring and verifying the normal state between cases. Keep both account guards active. Test fresh connections as well as an existing download and the reader's retries. | Fault | Expected Result | | --- | --- | | Remove the usable VPN default from table `101` | Marked lookup fails through the unreachable default; reader cannot switch to direct access. | | Remove the mark selector | Lookup may become direct; the independent UID guard blocks the reader. | | Remove the marking rule | Reader packets may remain unmarked; the same UID guard blocks direct output. | | Stop the VPN through its supported controls | Reader traffic fails closed; ordinary-account direct and LAN traffic remain usable. | | VPN becomes unresponsive but interface remains | Reader may hang or time out; it must not establish a direct fallback. | | Try IPv6 from the reader account | No IPv6 traffic from that account leaves the host. | | Reconnect or recreate the tunnel | Recheck address, routes, reverse-path filter, SNAT, and guards before resuming the reader. | For the first fault, remove only the usable default, test, then restore it when the interface and source address are verified: ```bash sudo ip -4 route del default dev tun0 src 10.8.0.2 metric 100 table 101 ip -4 route show table 101 ip -4 route get 203.0.113.10 mark 0x100 ``` ```bash sudo ip -4 route add default dev tun0 src 10.8.0.2 metric 100 table 101 ``` For the second fault, test between the delete and restore blocks: ```bash sudo ip -4 rule del priority 10100 fwmark 0x100 lookup 101 ``` ```bash sudo ip -4 rule add priority 10100 fwmark 0x100 lookup 101 ``` For the third fault, test between the delete and restore blocks: ```bash sudo iptables -w -t mangle -D OUTPUT -m owner --uid-owner "$NEWS_UID" -m comment --comment newsvpn-mark -j MARK --set-mark 0x100 ``` ```bash sudo iptables -w -t mangle -A OUTPUT -m owner --uid-owner "$NEWS_UID" -m comment --comment newsvpn-mark -j MARK --set-mark 0x100 ``` A routing rejection can occur before the firewall guard sees a packet, so its counter need not increase in every failure test. For direct-fallback attempts caused by a missing mark or selector, inspect the UID guard's counter and the physical-interface capture. A timeout alone proves neither correct classification nor absence of leakage. For the IPv6 test, use a permitted IPv6 endpoint and inspect guard counters/captures. If the host has no usable IPv6 path, record that limitation: a failed connection alone does not demonstrate enforcement on an IPv6-capable host. Independently verify the dedicated DNS policy throughout failure and reconnection tests, including the shared resolver and requests from other accounts. The reader-only IPv6 guard is not host-wide DNS protection. ## 11. Withdrawal and Persistence Stop the reader and its helpers. Retain both account guards. Inspect which example-owned entries remain, and remove only those present: ```bash sudo iptables -w -t mangle -D OUTPUT -m owner --uid-owner "$NEWS_UID" -m comment --comment newsvpn-mark -j MARK --set-mark 0x100 sudo ip -4 rule del priority 10100 fwmark 0x100 lookup 101 sudo iptables -w -t nat -D POSTROUTING -s 192.168.50.10/32 -o tun0 -m mark --mark 0x100 -m comment --comment newsvpn-snat -j SNAT --to-source 10.8.0.2 sudo ip -4 route del default dev tun0 src 10.8.0.2 metric 100 table 101 sudo ip -4 route del unreachable default metric 32767 table 101 ``` An entry already absent after a deliberate fault is different from an unexplained command failure. Restore the recorded `tun0` reverse-path-filter value if this example alone changed it and the same interface still exists. Remove only this exercise's local hosts mapping, if one was used. Existing conntrack entries may outlive rule deletion; keep the application stopped rather than flushing unrelated sessions. Keeping the guards means the account remains blocked from direct use. Their removal is a deliberate change in protection, not automatic error cleanup. Do not delete or recycle the account while a numeric-UID guard is intended to protect it. After runtime tests pass, persistence needs one configuration owner: account guards before the reader can start; table, SNAT, reverse-path policy, selector, and marking ready before the reader is enabled; and safe reapplication when the tunnel is recreated. Stop on setup failure and preserve blocking. Do not simply concatenate these blocks into a boot script. Verify firewall-manager reloads and a reboot with independent recovery access. ## Review Status and Article Boundaries - Proposed: command order, independent guards, complete mark assignment and exact matching, routing table, scoped SNAT, reverse-path behavior, inspection, failure tests, and withdrawal. - Not yet validated: a named distribution/backend, VPN manager, actual reader and launch procedure, resolver path, runtime behavior, or startup integration. - Unchanged: approved prose drafts, original articles, counters, and the prototype article tree. - Usenet background belongs in [separate planned articles](USENET-ARTICLE-PLAN.md). The routing example should retain only a short scope note and later links to those articles. No nonexistent public article URL is introduced.