Warning: Understand that changing this has an impact on the memory usage of the machine as these details are stored in memory and iptables require greater resources to deal with storing larger amounts of data.
Setup the xt_recent configuration file
Create the file /etc/modprobe.d/xt_recent.conf and include a line like this:
options xt_recent ip_list_tot=50 ip_pkt_list_tot=150
Don't forget to add some comments about what you're doing. Future you will thank you.
Prepare to reinitialize xt_recent
Before we remove any rules in your firewall currently using the recent module or simply disable the firewall. You may want to save your rules before you do this with
sudo iptables-save > somefile.txt or maybe
sudo service iptables save if you distro supports that.
Choose one of these two depending on your situation to clean up. You could also simply restart your computer at this point and skip to adding rules.
To shutdown iptables
sudo service iptables stop
To Remove specific Rules:
iptables -L --line-numbers to list the rules and look for "recent:" in the rules.
iptables -D INPUT # where # is the line number to delete rules.
Remove the module with
sudo modprobe -r xt_recent.
Add it back with
sudo modprobe xt_recent.
Check to make sure your parameters were applied with
sudo cat /sys/module/xt_recent/parameters/ip_pkt_list_tot.
Add the rules that you couldn't
If you stopped iptables
sudo service iptables start to bring it back.
Add your rules back in with the higher values you wanted.
sudo watch 'iptables -nvL' will allow you to watch stuff hit the xt_recent rules.