Commit c5054498 authored by 神楽坂玲奈's avatar 神楽坂玲奈

iptables

parent b4023b04
Pipeline #15943 failed with stages
in 43 seconds
...@@ -5,6 +5,9 @@ cp /etc/resolv.conf /etc/resolv.conf.bak ...@@ -5,6 +5,9 @@ cp /etc/resolv.conf /etc/resolv.conf.bak
umount /etc/resolv.conf umount /etc/resolv.conf
cp /etc/resolv.conf.bak /etc/resolv.conf cp /etc/resolv.conf.bak /etc/resolv.conf
# anyconnect, don't touch my iptables
mv `which iptables` /
./vpnagentd ./vpnagentd
echo -e "${username}\n${password}" | ./vpn -s connect ${host} echo -e "${username}\n${password}" | ./vpn -s connect ${host}
...@@ -12,6 +15,7 @@ address=$(./vpn stats | grep "Client Address (IPv4)" | grep -Po '[0-9.]{7,15}') ...@@ -12,6 +15,7 @@ address=$(./vpn stats | grep "Client Address (IPv4)" | grep -Po '[0-9.]{7,15}')
interface=$(ip --brief address | grep ${address} | cut -d ' ' -f 1) interface=$(ip --brief address | grep ${address} | cut -d ' ' -f 1)
# 改名字再alias回去 ? # 改名字再alias回去 ?
echo $interface up echo $interface up
PATH=$PATH:/ iptables -V
#trap 等信号来了down #trap 等信号来了down
sleep infinity sleep infinity
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment