Iptables und openvpn: Unterschied zwischen den Versionen
Zur Navigation springen
Zur Suche springen
| (Eine dazwischenliegende Version desselben Benutzers wird nicht angezeigt) | |||
| Zeile 3: | Zeile 3: | ||
*LANDEV=ens19 | *LANDEV=ens19 | ||
*VPNDEV=tun0 | *VPNDEV=tun0 | ||
| − | *OVPNPORT= | + | *OVPNPORT=1194 |
*LAN=10.82.228.0/24 | *LAN=10.82.228.0/24 | ||
*VPN=172.31.2.0/24 | *VPN=172.31.2.0/24 | ||
| Zeile 10: | Zeile 10: | ||
=Vorausgesetztes Connection Tracking= | =Vorausgesetztes Connection Tracking= | ||
;Verschlüsselter Verkehr | ;Verschlüsselter Verkehr | ||
| − | *iptables -A INPUT -p udp --dport $OVPNPORT -m state --state NEW -j ACCEPT | + | *iptables -A INPUT -p udp --dport $OVPNPORT -i $WANDEV -m state --state NEW -j ACCEPT |
;VPN Pakete ins LAN | ;VPN Pakete ins LAN | ||
*iptables -A FORWARD -i $VPNDEV -o $LANDEV -s $VPN -d $LAN -m state --state NEW -j ACCEPT | *iptables -A FORWARD -i $VPNDEV -o $LANDEV -s $VPN -d $LAN -m state --state NEW -j ACCEPT | ||
Aktuelle Version vom 9. Dezember 2022, 09:55 Uhr
Variablen
- WANDEV=eth0
- LANDEV=ens19
- VPNDEV=tun0
- OVPNPORT=1194
- LAN=10.82.228.0/24
- VPN=172.31.2.0/24
Vorausgesetztes Connection Tracking
- Verschlüsselter Verkehr
- iptables -A INPUT -p udp --dport $OVPNPORT -i $WANDEV -m state --state NEW -j ACCEPT
- VPN Pakete ins LAN
- iptables -A FORWARD -i $VPNDEV -o $LANDEV -s $VPN -d $LAN -m state --state NEW -j ACCEPT
