What's new

Blocking packets with iptables

  • SNBForums Code of Conduct

    SNBForums is a community for everyone, no matter what their level of experience.

    Please be tolerant and patient of others, especially newcomers. We are all here to share and learn!

    The rules are simple: Be patient, be nice, be helpful or be gone!

andreas93

New Around Here
Hello i am trying to block a packet on my gameserver called banned_cdkey. But i cant get this command to work.
iptables -A INPUT -p udp -m string --algo bm --string "BANNED_CDKEY" --sport 20600 --dport 28960 -j DROP

Do i need to add a soruce ip of the computer or what am i doing wrong?
 
No the packet is not encrypted because it works fine on a ubuntu machine. Im trying to do the same for windows but with the asus router as firewall.
 
Is everything happening on your local network?

The INPUT chain is for packets destined for the router itself. The FORWARD chain is for packets passing through the router. Use -I instead of -A to put the rule on top.
Code:
iptables -I FORWARD -p udp -m string --algo bm --string "BANNED_CDKEY" --sport 20600 --dport 28960 -j DROP
 
Last edited:

Similar threads

Latest threads

Support SNBForums w/ Amazon

If you'd like to support SNBForums, just use this link and buy anything on Amazon. Thanks!

Sign Up For SNBForums Daily Digest

Get an update of what's new every day delivered to your mailbox. Sign up here!
Top