Update tests
This commit is contained in:
parent
472ef7df94
commit
6773631d26
97
.github/workflows/test_set_1.yml
vendored
97
.github/workflows/test_set_1.yml
vendored
@ -85,79 +85,51 @@ jobs:
|
||||
systemctl start rsyslog
|
||||
|
||||
cp -f /opt/src/scripts/vpnsetup.sh .
|
||||
sed -i '/curl /a sed -i "/swan_ver_latest=/s/^/#/" "$tmpdir/vpn.sh"' vpnsetup.sh
|
||||
|
||||
sh vpnsetup.sh
|
||||
|
||||
systemctl start xl2tpd
|
||||
restart_ipsec
|
||||
restart_fail2ban
|
||||
cat /var/log/fail2ban.log
|
||||
|
||||
netstat -anpu | grep pluto
|
||||
netstat -anpu | grep xl2tpd
|
||||
iptables -nvL
|
||||
iptables -nvL | grep -q 'ppp+'
|
||||
iptables -nvL | grep -q '192\.168\.43\.0/24'
|
||||
iptables -nvL -t nat
|
||||
iptables -nvL -t nat | grep -q '192\.168\.42\.0/24'
|
||||
iptables -nvL -t nat | grep -q '192\.168\.43\.0/24'
|
||||
grep pluto "$log1"
|
||||
grep xl2tpd "$log2"
|
||||
ipsec status
|
||||
ipsec status | grep -q l2tp-psk
|
||||
ipsec status | grep -q xauth-psk
|
||||
|
||||
ls -l /usr/bin/ikev2.sh
|
||||
ls -l /opt/src/ikev2.sh
|
||||
|
||||
cp -f /opt/src/scripts/extras/vpnuninstall.sh ./vpnunst.sh
|
||||
bash vpnunst.sh <<ANSWERS
|
||||
y
|
||||
ANSWERS
|
||||
rm -f /usr/bin/ikev2.sh /opt/src/ikev2.sh
|
||||
if grep -qi stream /etc/redhat-release; then
|
||||
mkdir /etc/xl2tpd
|
||||
fi
|
||||
|
||||
cp -f /opt/src/scripts/extras/quickstart.sh .
|
||||
cp -f /opt/src/scripts/extras/vpnuninstall.sh ./vpnunst.sh
|
||||
sed -i -e '/curl /a sed -i "/swan_ver_latest=/s/^/#/" "$tmpdir/vpn.sh"' \
|
||||
-e '/sleep 1/a sed -i "/swan_ver_latest=/s/^/#/" /opt/src/ikev2.sh' quickstart.sh
|
||||
-e '/sleep 1/a sed -i "/swan_ver_latest=/s/^/#/" /opt/src/ikev2.sh' \
|
||||
vpnsetup.sh quickstart.sh
|
||||
|
||||
sh quickstart.sh
|
||||
for vpnsc in vpnsetup.sh quickstart.sh; do
|
||||
sh "$vpnsc"
|
||||
|
||||
systemctl restart xl2tpd
|
||||
restart_ipsec
|
||||
restart_fail2ban
|
||||
cat /var/log/fail2ban.log
|
||||
systemctl restart xl2tpd
|
||||
restart_ipsec
|
||||
restart_fail2ban
|
||||
cat /var/log/fail2ban.log
|
||||
|
||||
netstat -anpu | grep pluto
|
||||
netstat -anpu | grep xl2tpd
|
||||
iptables -nvL
|
||||
iptables -nvL | grep -q 'ppp+'
|
||||
iptables -nvL | grep -q '192\.168\.43\.0/24'
|
||||
iptables -nvL -t nat
|
||||
iptables -nvL -t nat | grep -q '192\.168\.42\.0/24'
|
||||
iptables -nvL -t nat | grep -q '192\.168\.43\.0/24'
|
||||
ipsec status
|
||||
ipsec status | grep -q l2tp-psk
|
||||
ipsec status | grep -q xauth-psk
|
||||
ipsec status | grep -q ikev2-cp
|
||||
netstat -anpu | grep pluto
|
||||
netstat -anpu | grep xl2tpd
|
||||
iptables -nvL
|
||||
iptables -nvL | grep -q 'ppp+'
|
||||
iptables -nvL | grep -q '192\.168\.43\.0/24'
|
||||
iptables -nvL -t nat
|
||||
iptables -nvL -t nat | grep -q '192\.168\.42\.0/24'
|
||||
iptables -nvL -t nat | grep -q '192\.168\.43\.0/24'
|
||||
grep pluto "$log1"
|
||||
grep xl2tpd "$log2"
|
||||
ipsec status
|
||||
ipsec status | grep -q l2tp-psk
|
||||
ipsec status | grep -q xauth-psk
|
||||
ipsec status | grep -q ikev2-cp
|
||||
|
||||
ls -ld /etc/ipsec.d/vpnclient.mobileconfig
|
||||
ls -ld /etc/ipsec.d/vpnclient.sswan
|
||||
ls -ld /etc/ipsec.d/vpnclient.p12
|
||||
ls -ld /etc/ipsec.d/vpnclient.mobileconfig
|
||||
ls -ld /etc/ipsec.d/vpnclient.sswan
|
||||
ls -ld /etc/ipsec.d/vpnclient.p12
|
||||
|
||||
ls -l /usr/bin/ikev2.sh
|
||||
ls -l /opt/src/ikev2.sh
|
||||
ls -l /usr/bin/ikev2.sh
|
||||
ls -l /opt/src/ikev2.sh
|
||||
|
||||
bash vpnunst.sh <<ANSWERS
|
||||
y
|
||||
ANSWERS
|
||||
rm -f /usr/bin/ikev2.sh /opt/src/ikev2.sh
|
||||
if grep -qi stream /etc/redhat-release; then
|
||||
mkdir /etc/xl2tpd
|
||||
fi
|
||||
rm -f /usr/bin/ikev2.sh /opt/src/ikev2.sh
|
||||
rm -f /etc/ipsec.d/vpnclient*
|
||||
if grep -qi stream /etc/redhat-release; then
|
||||
mkdir /etc/xl2tpd
|
||||
fi
|
||||
done
|
||||
|
||||
if [ "$1" != "amazon" ]; then
|
||||
cp -f /opt/src/scripts/vpnsetup_centos.sh ./vpnsetup.sh
|
||||
@ -316,7 +288,6 @@ jobs:
|
||||
restart_ipsec
|
||||
ipsec status | grep -q ikev2-cp
|
||||
|
||||
bash ikev2.sh --auto --addclient invalidclient: 2>&1 | grep -i "warning"
|
||||
bash ikev2.sh --addclient invalidclient: 2>&1 | grep -i "invalid"
|
||||
bash ikev2.sh --addclient vpnclient1 2>&1 | grep -i "already exists"
|
||||
|
||||
|
115
.github/workflows/test_set_2.yml
vendored
115
.github/workflows/test_set_2.yml
vendored
@ -88,92 +88,56 @@ jobs:
|
||||
fi
|
||||
|
||||
cp -f "$GITHUB_WORKSPACE"/vpnsetup.sh .
|
||||
sed -i '/curl /a sed -i "/swan_ver_latest=/s/^/#/" "$tmpdir/vpn.sh"' vpnsetup.sh
|
||||
|
||||
sh vpnsetup.sh
|
||||
|
||||
if [ "$os_type" = "alpine" ]; then
|
||||
ipsec initnss
|
||||
xl2tpd -c /etc/xl2tpd/xl2tpd.conf
|
||||
restart_ipsec
|
||||
else
|
||||
restart_ipsec
|
||||
restart_fail2ban
|
||||
cat /var/log/fail2ban.log
|
||||
fi
|
||||
|
||||
netstat -anpu | grep pluto
|
||||
netstat -anpu | grep xl2tpd
|
||||
iptables -nvL
|
||||
iptables -nvL | grep -q 'ppp+'
|
||||
iptables -nvL | grep -q '192\.168\.43\.0/24'
|
||||
iptables -nvL -t nat
|
||||
iptables -nvL -t nat | grep -q '192\.168\.42\.0/24'
|
||||
iptables -nvL -t nat | grep -q '192\.168\.43\.0/24'
|
||||
grep pluto "$log1"
|
||||
grep xl2tpd "$log2"
|
||||
ipsec status
|
||||
ipsec status | grep -q l2tp-psk
|
||||
ipsec status | grep -q xauth-psk
|
||||
|
||||
ls -l /usr/bin/ikev2.sh
|
||||
ls -l /opt/src/ikev2.sh
|
||||
|
||||
cp -f "$GITHUB_WORKSPACE"/extras/vpnuninstall.sh ./vpnunst.sh
|
||||
bash vpnunst.sh <<ANSWERS
|
||||
y
|
||||
ANSWERS
|
||||
rm -f /usr/bin/ikev2.sh /opt/src/ikev2.sh
|
||||
|
||||
if [ "$os_type" = "alpine" ]; then
|
||||
killall pluto || true
|
||||
killall xl2tpd || true
|
||||
fi
|
||||
|
||||
cp -f "$GITHUB_WORKSPACE"/extras/quickstart.sh .
|
||||
cp -f "$GITHUB_WORKSPACE"/extras/vpnuninstall.sh ./vpnunst.sh
|
||||
sed -i -e '/curl /a sed -i "/swan_ver_latest=/s/^/#/" "$tmpdir/vpn.sh"' \
|
||||
-e '/sleep 1/a sed -i "/swan_ver_latest=/s/^/#/" /opt/src/ikev2.sh' quickstart.sh
|
||||
-e '/sleep 1/a sed -i "/swan_ver_latest=/s/^/#/" /opt/src/ikev2.sh' \
|
||||
vpnsetup.sh quickstart.sh
|
||||
|
||||
sh quickstart.sh
|
||||
for vpnsc in vpnsetup.sh quickstart.sh; do
|
||||
sh "$vpnsc"
|
||||
|
||||
if [ "$os_type" = "alpine" ]; then
|
||||
xl2tpd -c /etc/xl2tpd/xl2tpd.conf
|
||||
restart_ipsec
|
||||
else
|
||||
restart_ipsec
|
||||
restart_fail2ban
|
||||
cat /var/log/fail2ban.log
|
||||
fi
|
||||
if [ "$os_type" = "alpine" ]; then
|
||||
xl2tpd -c /etc/xl2tpd/xl2tpd.conf
|
||||
restart_ipsec
|
||||
else
|
||||
restart_ipsec
|
||||
restart_fail2ban
|
||||
cat /var/log/fail2ban.log
|
||||
fi
|
||||
|
||||
netstat -anpu | grep pluto
|
||||
netstat -anpu | grep xl2tpd
|
||||
iptables -nvL
|
||||
iptables -nvL | grep -q 'ppp+'
|
||||
iptables -nvL | grep -q '192\.168\.43\.0/24'
|
||||
iptables -nvL -t nat
|
||||
iptables -nvL -t nat | grep -q '192\.168\.42\.0/24'
|
||||
iptables -nvL -t nat | grep -q '192\.168\.43\.0/24'
|
||||
ipsec status
|
||||
ipsec status | grep -q l2tp-psk
|
||||
ipsec status | grep -q xauth-psk
|
||||
ipsec status | grep -q ikev2-cp
|
||||
netstat -anpu | grep pluto
|
||||
netstat -anpu | grep xl2tpd
|
||||
iptables -nvL
|
||||
iptables -nvL | grep -q 'ppp+'
|
||||
iptables -nvL | grep -q '192\.168\.43\.0/24'
|
||||
iptables -nvL -t nat
|
||||
iptables -nvL -t nat | grep -q '192\.168\.42\.0/24'
|
||||
iptables -nvL -t nat | grep -q '192\.168\.43\.0/24'
|
||||
grep pluto "$log1"
|
||||
grep xl2tpd "$log2"
|
||||
ipsec status
|
||||
ipsec status | grep -q l2tp-psk
|
||||
ipsec status | grep -q xauth-psk
|
||||
ipsec status | grep -q ikev2-cp
|
||||
|
||||
ls -ld /etc/ipsec.d/vpnclient.mobileconfig
|
||||
ls -ld /etc/ipsec.d/vpnclient.sswan
|
||||
ls -ld /etc/ipsec.d/vpnclient.p12
|
||||
ls -ld /etc/ipsec.d/vpnclient.mobileconfig
|
||||
ls -ld /etc/ipsec.d/vpnclient.sswan
|
||||
ls -ld /etc/ipsec.d/vpnclient.p12
|
||||
|
||||
ls -l /usr/bin/ikev2.sh
|
||||
ls -l /opt/src/ikev2.sh
|
||||
ls -l /usr/bin/ikev2.sh
|
||||
ls -l /opt/src/ikev2.sh
|
||||
|
||||
bash vpnunst.sh <<ANSWERS
|
||||
y
|
||||
ANSWERS
|
||||
rm -f /usr/bin/ikev2.sh /opt/src/ikev2.sh
|
||||
|
||||
if [ "$os_type" = "alpine" ]; then
|
||||
killall pluto || true
|
||||
killall xl2tpd || true
|
||||
fi
|
||||
rm -f /usr/bin/ikev2.sh /opt/src/ikev2.sh
|
||||
rm -f /etc/ipsec.d/vpnclient*
|
||||
if [ "$os_type" = "alpine" ]; then
|
||||
killall pluto || true
|
||||
killall xl2tpd || true
|
||||
fi
|
||||
done
|
||||
|
||||
if [ "$os_type" = "alpine" ]; then
|
||||
cp -f "$GITHUB_WORKSPACE"/vpnsetup_alpine.sh ./vpnsetup.sh
|
||||
@ -340,7 +304,6 @@ jobs:
|
||||
restart_ipsec
|
||||
ipsec status | grep -q ikev2-cp
|
||||
|
||||
bash ikev2.sh --auto --addclient invalidclient: 2>&1 | grep -i "warning"
|
||||
bash ikev2.sh --addclient invalidclient: 2>&1 | grep -i "invalid"
|
||||
bash ikev2.sh --addclient vpnclient1 2>&1 | grep -i "already exists"
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user