]> git.ipfire.org Git - thirdparty/strongswan.git/blob - testing/tests/route-based/net2net-xfrmi-netns/hosts/sun/etc/updown
testing: Add scenarios that use XFRM interfaces
[thirdparty/strongswan.git] / testing / tests / route-based / net2net-xfrmi-netns / hosts / sun / etc / updown
1 #!/bin/bash
2
3 IF_NAME="xfrmi-${PLUTO_IF_ID_IN}"
4
5 case "${PLUTO_VERB}" in
6 up-client)
7 /usr/local/libexec/ipsec/xfrmi -n "${IF_NAME}" -i "${PLUTO_IF_ID_IN}" -d eth0
8 ip link set "${IF_NAME}" up
9 ip route add 10.1.0.0/16 dev "${IF_NAME}"
10 iptables -A FORWARD -i "${IF_NAME}" -j ACCEPT
11 iptables -A FORWARD -o "${IF_NAME}" -j ACCEPT
12 ;;
13 down-client)
14 iptables -D FORWARD -i "${IF_NAME}" -j ACCEPT
15 iptables -D FORWARD -o "${IF_NAME}" -j ACCEPT
16 ip link del "${IF_NAME}"
17 ;;
18 esac