Jump to content
Калькуляторы

Про PF NAT нужно ограничить кол-во сессий

Задача дать больше потоков на 80 порт, ограничив на другие

 

Итак формирую правила

ee /etc/pf.conf

 

 

set limit states 128000
set optimization aggressive
nat pass on sk0 from 10.0.0.0/8 to any -> sk0
nat pass on sk0 from 192.168.0.0/16 to any -> sk0
table <me> { self }
table <users_bad> { 10.0.0.0/8 }
pass quick on lo0 all

pass in quick on { $int_if ng } proto { tcp udp } from any to <me> keep state
pass in quick proto tcp from any to <me> port { 22 80 443 } keep state
pass in quick on { $int_if ng } proto tcp from <users_bad> to any port 80 keep state (source-track rule, max-src-states 200)
pass in quick on { $int_if ng } proto { tcp udp } from <users_bad> to any keep state (source-track rule, max-src-states 100)

но что-то не работает, где я ошибся?

Share this post


Link to post
Share on other sites

сам себе отвечаю. По-моему я не определил переменные.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this