Search code examples
iptables

Iptables: Multiple -d flags not allowed(-dport and -d)


I tried to add a command like this in my iptables:

sudo iptables -A OUTPUT -p tcp --tcp-flags RST RST -d 2.25.52.5 -dport 6784 -j DROP

And I got

iptables v1.4.21: multiple -d flags not allowed

I'm trying to drop RSTs sent from my machine to 2.25.52.5:6784.


Solution

  • -d is destination address, if you want destination port please use --dport 6784

    Hope it helps.