Lan zu Lan VPN Linux-Firewall: Unterschied zwischen den Versionen
Zur Navigation springen
Zur Suche springen
(Die Seite wurde neu angelegt: „=IPsec= * cat /etc/ipsec.conf <syntaxhighlight lang="bash"> conn linux2pfsense authby=secret keyexchange=ikev1 left=10.66.252.40 leftsubnet…“) |
|||
| Zeile 19: | Zeile 19: | ||
10.66.252.40 10.66.252.10 : PSK "sysadm" | 10.66.252.40 10.66.252.10 : PSK "sysadm" | ||
</syntaxhighlight> | </syntaxhighlight> | ||
| + | *vi /usr/local/sbin/firewall | ||
| + | iptables -A FORWARD -i $LANDEV -o $WANDEV -s $LAN -d $OTH -m policy --dir out --pol ipsec -m state --state NEW -j ACCEPT | ||
| + | iptables -A FORWARD -i $WANDEV -o $LANDEV -s $OTH -d $LAN -m policy --dir in --pol ipsec -m state --state NEW -j ACCEPT | ||
Aktuelle Version vom 8. Februar 2022, 11:19 Uhr
IPsec
- cat /etc/ipsec.conf
conn linux2pfsense
authby=secret
keyexchange=ikev1
left=10.66.252.40
leftsubnet=10.66.254.0/24
right=10.66.252.10
rightsubnet=10.66.253.0/24
ike=aes256-sha512-modp4096
esp=aes256-sha512-modp4096
ikelifetime=28800
keylife=3600
auto=start
- cat /etc/ipsec.conf
10.66.252.40 10.66.252.10 : PSK "sysadm"
- vi /usr/local/sbin/firewall
iptables -A FORWARD -i $LANDEV -o $WANDEV -s $LAN -d $OTH -m policy --dir out --pol ipsec -m state --state NEW -j ACCEPT iptables -A FORWARD -i $WANDEV -o $LANDEV -s $OTH -d $LAN -m policy --dir in --pol ipsec -m state --state NEW -j ACCEPT