To have the tables load after reboot
sudo apt-get install iptables-persistent
Then after you edit the iptables, if you want to update the initial file you should
sudo /etc/init.d/iptables-persistent save
To enable the log, you need to:
iptables -N LOGGING
iptables -A INPUT -j LOGGING
iptables -A LOGGING -m limit --limit 10/min -j LOG --log-prefix "IPTables-Dropped: " --log-level 10
iptables -A LOGGING -j DROP
To delete all the info on the IP Tables, note that this is temporary and will be restored upon reboot unless you save it.
iptables -A INPUT -p udp --dport 5060 -m mac --mac-source 00:22:4d:ad:41:29 -j ACCEPT
iptables -A INPUT -p udp --dport 5060 -j DROP
Will only allow packets from the specified mac.
My particular problem is that that MAC address came from my router, as my Asterisk Server was behind it, so it useless. Maybe if the server was directly exposed to the internet it would have worked.