For example, I get a lot of UDP calls:
I need to block all connections that are NOT initiated by the client from port 27005.
I think this code should work:
iptables -A INPUT -p udp --sport :27004 -j REJECT iptables -A INPUT -p udp --sport 27006: -j REJECT iptables -A INPUT -p udp --sport 27005 -j ACCEPT But it does not work.
What could be the problem?

sudo iptables-save -t filter. - aleksandr barakin-A) to the end of the table, but to insert them into the beginning (-I). - aleksandr barakin pm#!/bin/bash PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin export DISPLAY=:0.0 iptables -I INPUT -s 31.204.100.0/22 -j REJECT iptables -A INPUT -p udp --sport :27004 -j REJECT iptables -A INPUT -p udp --sport 27006: -j REJECT iptables -A INPUT -p udp --sport 27005 -j ACCEPT iptables -I INPUT -s 95.213.195.1 -j ACCEPT- Pharma