Answer:
the first step Peter must take is to configure the default policies for each of the built-in chains to ACCEPT.
He can do this by running the following:
$ sudo iptables -P INPUT ACCEPT
$ sudo iptables -P FORWARD ACCEPT
$ sudo iptables -P OUTPUT ACCEPT
Step-by-step explanation:
If he doesn't do this, he stands the risk of being locked out of the server through the SSH.
Having done the above, he can proceed to run the following commands:
$ sudo iptables -t nat -F
$ sudo iptables -t mangle -F
$ sudo iptables -F
$ sudo iptables -X
The above will effectively flush (-F), and delete all non-default chains (-X).
Cheers