If you run into the following error message when attempting an
iptables-restore < my.rules:
iptables-restore v1.4.8: no command specified
then the problem is that you have very likely just copied and pasted stuff into
my.rules which has led to some dodgy line-breaks terminating blank lines in the file.
To fix, open the file in an editor, delete the blank lines and manually insert new ones in their place. It should be sufficient to do this only for blank lines that have been introduced during the copy & paste. Once this is done, save the file and attempt the
iptables-restore once again.