LINUX.ORG.RU

История изменений

Исправление ne-vlezay, (текущая версия) :

А как nftables блокировать по сингтурам?

CONNMARK   tcp  --  anywhere             anywhere             STRING match  "GET http://" ALGO name bm TO 65535 CONNMARK xset 0x2/0xfe
REJECT     tcp  --  anywhere             anywhere             STRING match  "HTTP/" ALGO name bm TO 65535 connmark match  0x2/0xfe reject-with tcp-reset
-A FORWARD -p tcp -m string --string "GET http://" --algo bm --to 65535 -j CONNMARK --set-xmark 0x2/0xfe
-A FORWARD -p tcp -m string --string "HTTP/" --algo bm --to 65535 -m connmark --mark 0x2/0xfe -j REJECT --reject-with tcp-reset
COMMIT

Исходная версия ne-vlezay, :

А как nftables блокирует по сингтурам? Или делает типо:

CONNMARK   tcp  --  anywhere             anywhere             STRING match  "GET http://" ALGO name bm TO 65535 CONNMARK xset 0x2/0xfe
REJECT     tcp  --  anywhere             anywhere             STRING match  "HTTP/" ALGO name bm TO 65535 connmark match  0x2/0xfe reject-with tcp-reset
-A FORWARD -p tcp -m string --string "GET http://" --algo bm --to 65535 -j CONNMARK --set-xmark 0x2/0xfe
-A FORWARD -p tcp -m string --string "HTTP/" --algo bm --to 65535 -m connmark --mark 0x2/0xfe -j REJECT --reject-with tcp-reset
COMMIT