2024-06-08 12:53:24 -07:00
|
|
|
#!/usr/bin/env bash
|
|
|
|
|
2024-06-08 16:27:49 -07:00
|
|
|
natpmpc -a 1 0 udp 60 -g 10.96.0.1 | grep -P "(?<=public port )\w+" -o >/home/marley/.vpn-port
|
2024-06-08 13:14:46 -07:00
|
|
|
|
2024-06-08 12:53:24 -07:00
|
|
|
while true; do
|
|
|
|
date
|
|
|
|
natpmpc -a 1 0 udp 60 -g 10.96.0.1 && natpmpc -a 1 0 tcp 60 -g 10.96.0.1 || {
|
|
|
|
echo -e "ERROR with natpmpc command \a"
|
|
|
|
break
|
|
|
|
}
|
|
|
|
sleep 45
|
|
|
|
done
|