less config

This commit is contained in:
tavo 2025-09-17 11:04:13 -06:00
parent 661649284b
commit a5464fe4ef

View file

@ -207,10 +207,7 @@ _vpn_new() {
PrivateKey = ${_server_sec_key}
ListenPort = ${_port}
Address = ${BG_WG_SUBNET_PREFIX}.${_new}.1/${BG_WG_INTERFACE_SUBNET_MASK}
PreUp =
PostUp = iptables -t nat -A POSTROUTING -s ${BG_WG_SUBNET_PREFIX}.${_new}.0/24 -o ${_server_interface} -j MASQUERADE; iptables -A INPUT -p udp -m udp --dport ${_port} -j ACCEPT; iptables -A FORWARD -i ${_vpn_interface} -j ACCEPT; iptables -A FORWARD -o ${_vpn_interface} -j ACCEPT;
PreDown =
PostDown =
" >"$_vpn_file"
chmod 600 "$_vpn_file"