Don't worry, the last part wasn't directed at you, basbosco. Some people here give bad advice and tell newbies to just ignore bogons, which is wrong. What you're trying to do is correct.
The link I posted above (click on where it says "right here") goes to a list of bogon networks, but I posted the link to the main page so if you bookmark it, you'll have the right place. They update the list from time to time. If you want to just directly download the list, you can get it
by clicking here. All that is left is to save that to a file and have netfilter/iptables load the file into it's block list. You should apply the blocking rule to your Internet NIC, because all these IPs are spoofed if they try to come in from the Internet.
I know how to do this in OpenBSD with PF, but I do not recall how to do it with netfilter/iptables. Maybe someone that is more familiar with iptables can show you how.
Preventing DoS attacks is a lot harder. First off, you cannot prevent any attack that uses up all your bandwidth. Only your ISP (and their carrier) can help with that. For simple things like ping floods, SYN floods, etc you can help a little. Turn on TCP SYN cookies to help with the possibility of a SYN flood. Also, you can add some rate limit options to iptables, but again I don't know the syntax for that, maybe someone else can help.