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 [2012/06/28 11:33]
val
сервис_portsentry [2020/07/23 05:28] (current)
val
Line 1: Line 1:
 ====== Сервис Portsentry ====== ====== Сервис Portsentry ======
  
-!!! Отключить самописный веб сервер !!!+  * [[https://​www.opennet.ru/​docs/​RUS/​portsentry/​portsentry3.html|Настройка portsentry]]
  
-===== Установка ​и настройка на блокировку с использованием route ====+===== Установка ​=====
  
-[[Сервисы Gateway и routing#Управление таблицей маршрутизации]]+==== Debian/​Ubuntu ==== 
 +<​code>​ 
 +# apt install portsentry 
 +</​code>​ 
 + 
 +===== Использование ​в режиме без ​блокировки ===== 
 + 
 +Настраивается по умолчанию
  
-==== Ubuntu ==== 
 <​code>​ <​code>​
-serverapt-get install ​portsentry+cat /etc/portsentry/​portsentry.conf 
 +</​code><​code>​ 
 +... 
 +BLOCK_UDP="​0"​ 
 +BLOCK_TCP="​0"​ 
 +... 
 +</​code><​code>​ 
 +# tail -f /​var/​log/​syslog 
 +</​code>​
  
-server# tail -f /​var/​log/​syslog+===== Включение блокировки =====
  
-server# cat /​etc/​portsentry/​portsentry.conf+<​code>​ 
 +# cat /​etc/​portsentry/​portsentry.conf
 </​code><​code>​ </​code><​code>​
 ... ...
Line 19: Line 34:
 BLOCK_TCP="​1"​ BLOCK_TCP="​1"​
 ... ...
-</​code>​<​code>​ +</​code>​
-gate# /​etc/​init.d/​portsentry restart+
  
-server# cat /​var/​lib/​portsentry/​portsentry.blocked.*+===== Блокировка с использованием route =====
  
-servernetstat ​-rn | grep '​!H'​+  * Включена по умолчанию 
 +  * [[Сервисы 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>​
  
-==== FreeBSD ​====+===== Блокировка с использованием libwrap =====
  
-[[http://​www.lissyara.su/​articles/​freebsd/​security/​portsentry/​]]+  * Включена по умолчанию 
 +  * [[Сервис Tcpwrap#​Конфигурация в режиме "​все разрешено,​ кроме"​]]
  
 <​code>​ <​code>​
 +# :> /​etc/​hosts.deny
  
 +# cat /​etc/​portsentry/​portsentry.conf
 +</​code><​code>​
 +...
 +KILL_HOSTS_DENY="​ALL:​ $TARGET$"​
 +...
 </​code>​ </​code>​
 +
 +===== Просмотр заблокированных хостов =====
 +<​code>​
 +# cat /​var/​lib/​portsentry/​portsentry.blocked.*
 +</​code>​
 +
сервис_portsentry.1340868835.txt.gz · Last modified: 2013/05/22 13:50 (external edit)