You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Refactor OpenVPN support into separate modules for server and site-to-site configurations
- Updated documentation to reflect changes in OpenVPN support, including new variable names and configurations for `openvpn_server` and `openvpn_sitetosite`.
- Removed the unified OpenVPN module and created dedicated modules: `ip_30_openvpn_server.sh`, `ip_31_openvpn_sitetosite.sh`, and their corresponding nftables versions.
- Introduced new environment variables for site-to-site configurations and updated existing ones for server configurations.
- Implemented validation and rule application logic for both OpenVPN server and site-to-site modules.
- Added design notes for Oracle1 site-to-site configuration.
El script puede abrir el puerto de OpenVPN, permitir acceso desde el tun hacia el host y habilitar forwarding controlado hacia la LAN. Esto evita que el tráfico VPN pase por las cadenas de rate limiting del juego.
121
121
122
-
**Variables principales:**
122
+
**Variables principales (`openvpn_server`):**
123
123
```bash
124
-
VPN_PROTO="udp"
125
-
VPN_PORT=1194
126
-
VPN_SUBNET="10.8.0.0/24"
127
-
VPN_INTERFACE="tun0"# o "tun+" para varios
128
-
VPN_DOCKER_INTERFACE="docker0"# opcional (OpenVPN en Docker)
129
-
VPN_LAN_SUBNET="192.168.1.0/24"
130
-
VPN_LAN_INTERFACE="enp3s0"# requerido si VPN_ENABLE_NAT=true
131
-
VPN_ENABLE_NAT=false
132
-
VPN_LOG_ENABLED=false
133
-
VPN_LOG_PREFIX="VPN_TRAFFIC: "
124
+
OVPNSRV_PROTO="udp"
125
+
OVPNSRV_PORT=1194
126
+
OVPNSRV_SUBNET="10.8.0.0/24"
127
+
OVPNSRV_INTERFACE="tun0"# o "tun+" para varios
128
+
OVPNSRV_DOCKER_INTERFACE="docker0"# opcional (OpenVPN en Docker)
129
+
OVPNSRV_LAN_SUBNET="192.168.1.0/24"
130
+
OVPNSRV_LAN_INTERFACE="enp3s0"# requerido si OVPNSRV_ENABLE_NAT=true
131
+
OVPNSRV_ENABLE_NAT=false
132
+
OVPNSRV_LOG_ENABLED=false
133
+
OVPNSRV_LOG_PREFIX="VPN_SERVER_TRAFFIC: "
134
134
```
135
135
136
136
**Reglas generadas (resumen):**
137
-
- INPUT: permite handshake OpenVPN en `VPN_PORT` y acceso desde `VPN_SUBNET` por la interfaz VPN.
138
-
- FORWARD: permite `VPN_SUBNET -> VPN_LAN_SUBNET` y retorno `ESTABLISHED,RELATED`.
139
-
- NAT opcional: `MASQUERADE` para `VPN_SUBNET` cuando no existe ruta estática en el router.
137
+
- INPUT: permite handshake OpenVPN en `OVPNSRV_PORT` y acceso desde `OVPNSRV_SUBNET` por la interfaz VPN.
138
+
- FORWARD: permite `OVPNSRV_SUBNET -> OVPNSRV_LAN_SUBNET` y retorno `ESTABLISHED,RELATED`.
139
+
- NAT opcional: `MASQUERADE` para `OVPNSRV_SUBNET` cuando no existe ruta estática en el router.
140
140
- Logging opcional: limitado por rate limit para evitar spam.
141
141
142
142
**Notas:**
143
-
- Para OpenVPN en Docker con bridge, define `VPN_DOCKER_INTERFACE` (ej. `docker0` o `br+`).
143
+
- Para OpenVPN en Docker con bridge, define `OVPNSRV_DOCKER_INTERFACE` (ej. `docker0` o `br+`).
144
144
- Asegura `net.ipv4.ip_forward=1` si usas forwarding/NAT.
145
-
-`VPN_INTERFACE="tun+"` usa wildcard de iptables; en algunas distros puede requerir compatibilidad `iptables-legacy`/`iptables-nft`.
145
+
-`OVPNSRV_INTERFACE="tun+"` usa wildcard de iptables; en algunas distros puede requerir compatibilidad `iptables-legacy`/`iptables-nft`.
146
+
147
+
### Soporte OpenVPN Site-to-Site
148
+
149
+
Habilita enrutamiento entre subredes locales/remotas usando el módulo `openvpn_sitetosite`.
0 commit comments