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
Last revision Both sides next revision
сервис_portsentry [2015/05/13 12:28]
val [Настройка на блокировку с использованием libwrap]
сервис_portsentry [2020/07/22 20:47]
val [Сервис Portsentry]
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+===== Настройка на блокировку с использованием route =====
  
-server# cp portsentry.ignore.default portsentry.ignore  +[[Сервисы Gateway и routing#Управление таблицей маршрутизации]]
-</​code>​ +
- +
-===== Использование ​в режиме без ​блокировки =====+
  
 <​code>​ <​code>​
-server# cat portsentry.conf+# cat /​etc/​portsentry/​portsentry.conf
 </​code><​code>​ </​code><​code>​
 ... ...
-BLOCK_UDP="​0+BLOCK_UDP="​1
-BLOCK_TCP="​0"+BLOCK_TCP="​1" 
 +... 
 +# Newer versions of Linux support the reject flag now. This 
 +# 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>​
  
Line 47: Line 49:
  
 <​code>​ <​code>​
-server# :> /​etc/​hosts.deny+# :> /​etc/​hosts.deny
  
-server# cat 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