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 [2015/05/13 12:25]
val [Использование в режиме без блокировки]
сервис_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>​ </​code>​
  
-==== FreeBSD ​==== +===== Использование в режиме без блокировки =====
-<​code>​ +
-freebsd8# pkg_add -r portsentry+
  
-freebsd10# pkg install portsentry+Настраивается по умолчанию
  
-servercd /usr/local/etc/+<​code>​ 
 +cat /etc/portsentry/portsentry.conf 
 +</​code><​code>​ 
 +... 
 +BLOCK_UDP="​0"​ 
 +BLOCK_TCP="​0"​ 
 +... 
 +</​code><​code>​ 
 +# tail -f /​var/​log/​syslog 
 +</code>
  
-server# cp portsentry.conf.default portsentry.conf+===== Включение блокировки =====
  
-servercp portsentry.ignore.default portsentry.ignore ​+<​code>​ 
 +cat /​etc/​portsentry/​portsentry.conf 
 +</​code><​code>​ 
 +... 
 +BLOCK_UDP="​1"​ 
 +BLOCK_TCP="​1"​ 
 +...
 </​code>​ </​code>​
  
-===== Использование в режиме без ​блокировки =====+===== Блокировка с использованием route ===== 
 + 
 +  * Включена по умолчанию 
 +  * [[Сервисы Gateway и routing#​Управление таблицей маршрутизации]]
  
 <​code>​ <​code>​
-server# cat portsentry.conf+# cat /​etc/​portsentry/​portsentry.conf
 </​code><​code>​ </​code><​code>​
 ... ...
-BLOCK_UDP="​0"​ +# Newer versions of Linux support the reject flag now. This 
-BLOCK_TCP="​0"​+# is cleaner than the above option. 
 +KILL_ROUTE=...
 ... ...
 </​code><​code>​ </​code><​code>​
-server# tail -f /var/log/​syslog +/sbin/route del -host 192.168.N.M reject
-или +
-server# tail -f /​var/​log/​messages+
 </​code>​ </​code>​
  
-===== Настройка на блокировку с использованием libwrap =====+===== Блокировка с использованием libwrap =====
  
-[[Сервис Tcpwrap#​Конфигурация в режиме "​все разрешено,​ кроме"​]]+  * Включена по умолчанию 
 +  * [[Сервис Tcpwrap#​Конфигурация в режиме "​все разрешено,​ кроме"​]]
  
 <​code>​ <​code>​
-server# :> /​etc/​hosts.deny+# :> /​etc/​hosts.deny
  
-server# cat /​etc/​portsentry/​portsentry.conf+# cat /​etc/​portsentry/​portsentry.conf
 </​code><​code>​ </​code><​code>​
-... 
-BLOCK_UDP="​1"​ 
-BLOCK_TCP="​1"​ 
 ... ...
 KILL_HOSTS_DENY="​ALL:​ $TARGET$"​ KILL_HOSTS_DENY="​ALL:​ $TARGET$"​
 ... ...
 </​code>​ </​code>​
- 
-===== Настройка на блокировку с использованием route ===== 
- 
-[[Сервисы Gateway и routing#​Управление таблицей маршрутизации]] 
  
 ===== Просмотр заблокированных хостов ===== ===== Просмотр заблокированных хостов =====
 <​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