Twitter iPhone pliant OnePlus 11 PS5 Disney+ Orange Livebox Windows 11

[OpenBSD 3.6] pf et altq

1 réponse
Avatar
Arnaud Boudou
Bonjour,

J'ai l'architecture suivante

[ serveur mail ] ------ (rl0)[ OpenBSD ](tun0) ----- (Internet)

Coté rl0, c'est un lien en 100 Mb/s full duplex
Coté tun0, c'est un lien ADSL à 2Mb en down et 256 Kb en up

Ce que je souhaite faire, c'est limiter en sortie à 192 Kb/s uniquement
pour les protocoles POP3, POP3s, IMAP et IMAPs. Ensuite je ne dois pas
limiter le reste.

Ce que j'ai mis dans mon fichier de configuration est :

ext_if="tun0"
int_if="rl0"

scrub in all fragment reassemble

# altq
altq on $int_if cbq bandwidth 100Mb queue { std, popimap }
queue std bandwidth 99Mb cbq(default)
queue popimap bandwidth 192Kb cbq(ecn)

[... tout le bordel avec le NAT et les redirections WAN -> LAN ...]

# filtrage bande passante
pass in on $ext_if proto tcp from $pepe port 110 to any port 110 queue
popimap
pass in on $ext_if proto tcp from $pepe port 995 to any port 995 queue
popimap
pass in on $ext_if proto tcp from $pepe port 143 to any port 143 queue
popimap
pass in on $ext_if proto tcp from $pepe port 993 to any port 993 queue
popimap

pass in all
pass out all


Cette configuration vous parait-elle correcte ? et si non, qu'est ce qui
cloche ?

Cordialement
--
Arnaud Boudou
http://www.goddess-gate.com

1 réponse

Avatar
Arnaud Boudou

# filtrage bande passante
pass in on $ext_if proto tcp from $pepe port 110 to any port 110 queue
popimap
pass in on $ext_if proto tcp from $pepe port 995 to any port 995 queue
popimap
pass in on $ext_if proto tcp from $pepe port 143 to any port 143 queue
popimap
pass in on $ext_if proto tcp from $pepe port 993 to any port 993 queue
popimap



En fait je voulais mettre ça :

# filtrage bande passante
pass in on $int_if proto tcp from $pepe port 110 to any queue popimap
pass in on $int_if proto tcp from $pepe port 995 to any queue popimap
pass in on $int_if proto tcp from $pepe port 143 to any queue popimap
pass in on $int_if proto tcp from $pepe port 993 to any queue popimap

Mais un pfctl -v -s queue me montre que tout passe par la queue standard
et non pas par popimap

--
Arnaud Boudou
http://www.goddess-gate.com