17 lines
280 B
Plaintext
17 lines
280 B
Plaintext
|
#!/bin/sh
|
||
|
|
||
|
is_started() {
|
||
|
/sbin/iptables -L -n \
|
||
|
| grep -E "^(DROP\s+udp|ACCEPT\s+icmp)\s+--\s+0\.0\.0\.0\/0\s+0\.0\.0\.0\/0\s*$"
|
||
|
}
|
||
|
return_started() {
|
||
|
echo "started"
|
||
|
exit 0
|
||
|
}
|
||
|
return_stopped() {
|
||
|
echo "stopped"
|
||
|
exit 1
|
||
|
}
|
||
|
|
||
|
is_started && return_started || return_stopped
|