Maintain current version of TTL cgi

This commit is contained in:
iamromulan
2024-05-08 11:34:12 -04:00
parent e07d5b8bc4
commit 2534045ef5
2 changed files with 12 additions and 11 deletions

View File

@@ -1,7 +1,7 @@
#!/bin/bash
# Check iptables for ttlvalue
ttlvalue=$(iptables -t mangle -vnL | awk '/TTL/ {print $13; exit}')
ttlvalue=$(/opt/bin/sudo /usr/sbin/iptables -w 5 -t mangle -vnL | grep TTL | awk '{print $13}' | head -n1)
ttlenabled=true;
# Set Variables
@@ -17,4 +17,4 @@ cat <<EOT
"isEnabled": $ttlenabled,
"ttl": $ttlvalue
}
EOT
EOT