Native install: nftables script for VPN clients (masquerade, MSS clamp, TTL)

deploy/native/firewall.sh reads the server interfaces and applies, for traffic
from the VPN network to all other networks: masquerade, TCP MSS clamping
(path MTU tuning) and TTL tuning, in its own table `ip ovpmon`. Rules are
persisted in /etc/ovpmon/nftables.nft and loaded at boot by the ovpmon-nft
service (systemd and OpenRC). Opt-in: install.sh and update.sh do not call it.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
ayurishchevandClaude Sonnet 5.5 committed 2026-10-05 14:48:39 +03:00
1 parent 8371d889a4
commit f95a0b63e6
9 files changed
+713 -3

No files matched your search

+2
View File
@@ -525,6 +525,8 @@ Next steps:
iptables -A FORWARD -i tun+ -o $UPLINK -j ACCEPT
iptables -A FORWARD -i $UPLINK -o tun+ -m conntrack --ctstate RELATED,ESTABLISHED -j ACCEPT
net.ipv4.ip_forward is enabled ($SYSCTL_FILE). Persistence and nftables variants: see the guide.
With nftables: $SCRIPT_DIR/firewall.sh sets masquerade, TCP MSS clamping and TTL for the VPN clients
(read the interfaces, --dry-run first; after the VPN server configuration exists).
5. Replace the self-signed certificate ($TLS_DIR/ovpmon.crt and .key) with a real one when a domain is available.
Update later with: $SCRIPT_DIR/update.sh Backup: $SCRIPT_DIR/backup.sh
Log of this run: $DEPLOY_LOG