User Tools

Site Tools


сервис_portsentry

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
сервис_portsentry [2013/05/22 13:50]
127.0.0.1 внешнее изменение
сервис_portsentry [2020/07/23 05:28]
val
Line 1: Line 1:
 ====== Сервис Portsentry ====== ====== Сервис Portsentry ======
  
-!!! Отключить самописный веб сервер !!! +  * [[https://www.opennet.ru/docs/RUS/portsentry/portsentry3.html|Настройка ​portsentry]]
- +
-[[http://www.lissyara.su/articles/freebsd/security/portsentry/]]+
  
 ===== Установка ===== ===== Установка =====
  
-==== Ubuntu ====+==== Debian/Ubuntu ====
 <​code>​ <​code>​
-server# apt-get install portsentry +# apt install portsentry
- +
-server# cd /​etc/​portsentry/​  +
-</​code>​ +
- +
-==== FreeBSD ==== +
-<​code>​ +
-server# pkg_add -r portsentry +
- +
-server# cd /​usr/​local/​etc/​ +
- +
-server# cp portsentry.conf.default portsentry.conf +
- +
-server# cp portsentry.ignore.default portsentry.ignore ​+
 </​code>​ </​code>​
  
 ===== Использование в режиме без блокировки ===== ===== Использование в режиме без блокировки =====
 +
 +Настраивается по умолчанию
  
 <​code>​ <​code>​
-server# cat /​etc/​portsentry/​portsentry.conf+# cat /​etc/​portsentry/​portsentry.conf
 </​code><​code>​ </​code><​code>​
 ... ...
Line 35: Line 22:
 ... ...
 </​code><​code>​ </​code><​code>​
-server# tail -f /​var/​log/​syslog +# tail -f /​var/​log/​syslog
-или +
-server# tail -f /​var/​log/​messages+
 </​code>​ </​code>​
  
-===== Настройка на блокировку с использованием libwrap ​===== +===== Включение блокировки =====
- +
-[[Сервис Tcpwrap#​Конфигурация в режиме "​все разрешено,​ кроме"​]]+
  
 <​code>​ <​code>​
-server# cat /​etc/​portsentry/​portsentry.conf+# cat /​etc/​portsentry/​portsentry.conf
 </​code><​code>​ </​code><​code>​
 ... ...
Line 51: Line 34:
 BLOCK_TCP="​1"​ BLOCK_TCP="​1"​
 ... ...
-KILL_HOSTS_DENY="ALL: $TARGET$"​+</​code>​ 
 + 
 +===== Блокировка с использованием route ===== 
 + 
 +  * Включена по умолчанию 
 +  * [[Сервисы Gateway и routing#​Управление таблицей маршрутизации]] 
 + 
 +<​code>​ 
 +# cat /​etc/​portsentry/​portsentry.conf 
 +</​code><​code>​
 ... ...
 +# Newer versions of Linux support the reject flag now. This
 +# is cleaner than the above option.
 +KILL_ROUTE=...
 +...
 +</​code><​code>​
 +/sbin/route del -host 192.168.N.M reject
 </​code>​ </​code>​
  
-===== Настройка на блокировку с использованием ​route =====+===== Блокировка с использованием ​libwrap ​=====
  
-[[Сервисы Gateway и routing#Управление таблицей маршрутизации]]+  * Включена по умолчанию 
 +  * [[Сервис ​Tcpwrap#Конфигурация ​в режиме "все разрешено, кроме"​]] 
 + 
 +<​code>​ 
 +# :> /​etc/​hosts.deny 
 + 
 +# cat /​etc/​portsentry/​portsentry.conf 
 +</​code><​code>​ 
 +... 
 +KILL_HOSTS_DENY="​ALL:​ $TARGET$"​ 
 +... 
 +</​code>​
  
 ===== Просмотр заблокированных хостов ===== ===== Просмотр заблокированных хостов =====
 <​code>​ <​code>​
-server# cat /​var/​lib/​portsentry/​portsentry.blocked.* +# cat /​var/​lib/​portsentry/​portsentry.blocked.*
-или +
-server# cat /​usr/​local/​etc/​portsentry.blocked.*+
 </​code>​ </​code>​
  
сервис_portsentry.txt · Last modified: 2020/07/23 05:28 by val