Have you tried the --list (-L) argument?
$ sudo iptables -L
Chain INPUT (policy ACCEPT)
target prot opt source destination
Chain FORWARD (policy ACCEPT)
target prot opt source destination
Chain OUTPUT (policy ACCEPT)
target prot opt source destination
That output shows that there are no firewall entries.
If it did output you would see something like this...
$ sudo iptables -n -L -v --line-numbers
Chain INPUT (policy DROP)
num target prot opt source destination
1 DROP all -- 0.0.0.0/0 0.0.0.0/0 state INVALID
2 ACCEPT all -- 0.0.0.0/0 0.0.0.0/0 state RELATED,ESTABLISHED
3 ACCEPT all -- 0.0.0.0/0 0.0.0.0/0
4 ACCEPT all -- 0.0.0.0/0 0.0.0.0/0
Chain FORWARD (policy DROP)
num target prot opt source destination
1 ACCEPT all -- 0.0.0.0/0 0.0.0.0/0
2 DROP all -- 0.0.0.0/0 0.0.0.0/0 state INVALID
3 TCPMSS tcp -- 0.0.0.0/0 0.0.0.0/0 tcp flags:0x06/0x02 TCPMSS clamp to PMTU
4 ACCEPT all -- 0.0.0.0/0 0.0.0.0/0 state RELATED,ESTABLISHED
5 wanin all -- 0.0.0.0/0 0.0.0.0/0
6 wanout all -- 0.0.0.0/0 0.0.0.0/0
7 ACCEPT all -- 0.0.0.0/0 0.0.0.0/0
Chain OUTPUT (policy ACCEPT)
num target prot opt source destination
Chain wanin (1 references)
num target prot opt source destination
Chain wanout (1 references)
num target prot opt source destination
EDIT: Here is a one liner you can use: echo "$(sudo iptables -n -L -v --line-numbers)" | egrep "^[0-9]". Then just test if $? is 1 or 0. If its 0 then there are active firewall rules, if 1 then no active rules.
$ echo "$(sudo iptables -n -L -v --line-numbers)" | egrep "^[0-9]"
1 0 0 DROP all -- * * 202.54.1.2 0.0.0.0/0
$
$ echo $?
0
$
$ sudo iptables -D INPUT 1
$
$ echo "$(sudo iptables -n -L -v --line-numbers)" | egrep "^[0-9]"
$ echo $?
1
EDIT: Or using wc -l might be better....
echo "$(sudo iptables -n -L -v --line-numbers)" | egrep "^[0-9]" | wc -l
iptables -Land parse if necessary?