diff options
Diffstat (limited to 'ipmasq/rules/I50ipsec.rul')
-rw-r--r-- | ipmasq/rules/I50ipsec.rul | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/ipmasq/rules/I50ipsec.rul b/ipmasq/rules/I50ipsec.rul new file mode 100644 index 0000000..8d6e859 --- /dev/null +++ b/ipmasq/rules/I50ipsec.rul @@ -0,0 +1,22 @@ +#: Accept packets from remote ipsec networks on ipsec interfaces +if [ -n "$IPSECCONN" ]; then + for i in $IPSECCONN; do + eval "IPSEC_IF=\$IPSEC_IF_$i" + eval "IPSEC_HERE=\$IPSEC_HERE_$i" + eval "IPSEC_THERE=\$IPSEC_THERE_$i" + case $MASQMETHOD in + ipfwadm) + $IPFWADM -I -a accept -W ${IPSEC_IF%%:*} -S $IPSEC_HERE + $IPFWADM -I -a accept -W ${IPSEC_IF%%:*} -S $IPSEC_THERE + ;; + ipchains) + $IPCHAINS -A input -j ACCEPT -i ${IPSEC_IF%%:*} -s $IPSEC_HERE + $IPCHAINS -A input -j ACCEPT -i ${IPSEC_IF%%:*} -s $IPSEC_THERE + ;; + netfilter) + $IPTABLES -A INPUT -j ACCEPT -i ${IPSEC_IF%%:*} -s $IPSEC_HERE + $IPTABLES -A INPUT -j ACCEPT -i ${IPSEC_IF%%:*} -s $IPSEC_THERE + ;; + esac + done +fi |