Настройка PF

Проблемы с установкой, настройкой и работой системных и сетевых программ.

Модераторы: GRooVE, alexco

Правила форума
Убедительная просьба юзать теги [code] при оформлении листингов.
Сообщения не оформленные должным образом имеют все шансы быть незамеченными.
sn0wer
проходил мимо
Сообщения: 2
Зарегистрирован: 2012-04-09 16:10:27

Настройка PF

Непрочитанное сообщение sn0wer » 2012-04-09 16:12:28

pfconf

Код: Выделить всё

ext_if="igb0"
int_if="igb1"
set skip on lo0
scrub in all
nat on $ext_if from $int_if:network to any -> ($ext_if)
block all
pass in on $int_if from any to any
pass out on $ext_if from $ext_if to any
pass in on $ext_if proto tcp from any to $ext_if port ssh
pass in on $ext_if proto tcp from any to $ext_if port 80
#pass in on $ext_if proto tcp from any to $ext_if port 81 rdr-to 192.168.1.108 port 80
#pass in on $ext_if proto tcp from any to $ext_if port 37777 rdr-to 192.168.1.108 port 37777
#pass in on $ext_if proto udp from any to $ext_if port 37778 rdr-to 192.168.1.108 port 37778
pass in inet proto icmp all icmp-type echoreq 
Когда раскоменчиваю строчки все ложится. Где я наступил на грабли?

Хостинговая компания Host-Food.ru
Хостинг HostFood.ru
 

Услуги хостинговой компании Host-Food.ru

Хостинг HostFood.ru

Тарифы на хостинг в России, от 12 рублей: https://www.host-food.ru/tariffs/hosting/
Тарифы на виртуальные сервера (VPS/VDS/KVM) в РФ, от 189 руб.: https://www.host-food.ru/tariffs/virtualny-server-vps/
Выделенные сервера, Россия, Москва, от 2000 рублей (HP Proliant G5, Intel Xeon E5430 (2.66GHz, Quad-Core, 12Mb), 8Gb RAM, 2x300Gb SAS HDD, P400i, 512Mb, BBU):
https://www.host-food.ru/tariffs/vydelennyi-server-ds/
Недорогие домены в популярных зонах: https://www.host-food.ru/domains/

sn0wer
проходил мимо
Сообщения: 2
Зарегистрирован: 2012-04-09 16:10:27

Re: Настройка PF

Непрочитанное сообщение sn0wer » 2012-04-10 9:44:48

Код: Выделить всё

ext_if="igb0"		
int_if="igb1" 			
set skip on lo0
scrub in all 
nat on $ext_if from $int_if:network to any -> ($ext_if)
rdr on $ext_if proto tcp from any to any port 82 -> 192.168.1.108 port 80
rdr on $ext_if proto tcp from any to any port 37777 -> 192.168.1.108 port 37777
rdr on $ext_if proto udp from any to any port 37778 -> 192.168.1.108 port 37778
block all
pass in on $int_if from any to any 
pass out on $ext_if from $ext_if to any
pass out on $int_if inet proto tcp from any to 192.168.1.108 port 80 keep state
pass out on $int_if inet proto tcp from any to 192.168.1.108 port 37777
pass out on $int_if inet proto udp from any to 192.168.1.108 port 37778
pass in on $ext_if proto tcp from any to $ext_if port ssh
pass in on $ext_if proto tcp from any to $ext_if port 80
pass in on $ext_if proto tcp from any to $ext_if port 82
pass in on $ext_if proto tcp from any to 192.168.1.108 port 80 synproxy state
pass in on $ext_if proto tcp from any to 192.168.1.108 port 37777 synproxy state
pass in on $ext_if proto tcp from any to 192.168.1.108 port 37778 synproxy state 
pass in on $ext_if proto tcp from any to $ext_if port 37777
pass in on $ext_if proto udp from any to $ext_if port 37778
pass in inet proto icmp all icmp-type echoreq
так решил