User Tools

Site Tools


сервис_portsentry

Сервис Portsentry

Установка

Debian/Ubuntu

# apt install portsentry

Использование в режиме без блокировки

Настраивается по умолчанию

# cat /etc/portsentry/portsentry.conf
...
BLOCK_UDP="0"
BLOCK_TCP="0"
...
# tail -f /var/log/syslog

Включение блокировки

# cat /etc/portsentry/portsentry.conf
...
BLOCK_UDP="1"
BLOCK_TCP="1"
...

Блокировка с использованием route

# cat /etc/portsentry/portsentry.conf
...
# Newer versions of Linux support the reject flag now. This
# is cleaner than the above option.
KILL_ROUTE=...
...
/sbin/route del -host 192.168.N.M reject

Блокировка с использованием libwrap

# :> /etc/hosts.deny

# cat /etc/portsentry/portsentry.conf
...
KILL_HOSTS_DENY="ALL: $TARGET$"
...

Просмотр заблокированных хостов

# cat /var/lib/portsentry/portsentry.blocked.*
сервис_portsentry.txt · Last modified: 2020/07/23 05:28 by val