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
Next revision Both sides next revision
сервис_portsentry [2012/06/28 11:25]
val
сервис_portsentry [2020/07/22 06:21]
val
Line 1: Line 1:
 ====== Сервис Portsentry ====== ====== Сервис Portsentry ======
  
-===== Установка и настройка на блокировку с использованием route ====+!!! Отключить самописный ​веб сервер !!!
  
-[[Сервисы Gateway и routing#​Управление таблицей маршрутизации]]+[[http://​www.lissyara.su/​articles/​freebsd/​security/​portsentry/​]] 
 + 
 +===== Установка =====
  
-==== Ubuntu ====+==== Debian/Ubuntu ====
 <​code>​ <​code>​
-gate# apt-get install portsentry+# apt install portsentry 
 +</​code>​
  
-gate# tail -f /​var/​log/​syslog+===== Использование в режиме без блокировки =====
  
-gate# cat /​etc/​portsentry/​portsentry.conf+<​code>​ 
 +# cat /​etc/​portsentry/​portsentry.conf
 </​code><​code>​ </​code><​code>​
 ... ...
-BLOCK_UDP="​1+BLOCK_UDP="​0
-BLOCK_TCP="​1"+BLOCK_TCP="​0"
 ... ...
 </​code><​code>​ </​code><​code>​
-gate# /etc/init.d/portsentry restart+tail -f /var/log/syslog 
 +</​code>​
  
-gate# cat /​var/​lib/​portsentry/​portsentry.blocked.*+===== Настройка на блокировку с использованием libwrap =====
  
-gatenetstat -rn | grep '​!H'​+[[Сервис Tcpwrap#Конфигурация в режиме "​все разрешено,​ кроме"​]] 
 + 
 +<​code>​ 
 +# :> /​etc/​hosts.deny 
 + 
 +# cat /​etc/​portsentry/​portsentry.conf 
 +</​code><​code>​ 
 +... 
 +BLOCK_UDP="​1"​ 
 +BLOCK_TCP="​1"​ 
 +... 
 +KILL_HOSTS_DENY="​ALL:​ $TARGET$"​ 
 +...
 </​code>​ </​code>​
  
-==== FreeBSD ​====+===== Настройка на блокировку с использованием route =====
  
-[[http://​www.lissyara.su/​articles/​freebsd/​security/​portsentry/​]]+[[Сервисы Gateway и routing#​Управление таблицей маршрутизации]]
  
 <​code>​ <​code>​
 +# cat /​etc/​portsentry/​portsentry.conf 
 +</​code><​code>​ 
 +... 
 +KILL_ROUTE=... 
 +... 
 +</​code><​code>​ 
 +/sbin/route del -host 192.168.N.M reject
 </​code>​ </​code>​
 +===== Просмотр заблокированных хостов =====
 +<​code>​
 +# cat /​var/​lib/​portsentry/​portsentry.blocked.*
 +</​code>​
 +
сервис_portsentry.txt · Last modified: 2024/05/04 13:08 by val