# PF vs SSH and SFTP



## Philippe (Mar 11, 2011)

Hello,

I use FreeBSD 7.0

I'd like to know if it's possible to differentiate flows SSH and SFTP with PF (no with ALTQ).

Thank!

Philippe


----------



## SirDice (Mar 11, 2011)

Nope, both go over port 22.


----------



## Philippe (Mar 11, 2011)

With TOS TCP/IP header?


----------



## SirDice (Mar 11, 2011)

The same for both as both use the SSH protocol. Since you can't look inside you can't tell the difference.


----------



## Philippe (Mar 11, 2011)

Not possible to filter the bit ToSâ€‹â€‹?...

No other way?


----------



## DutchDaemon (Mar 11, 2011)

Should we just set up an auto-responder that posts 'no' to this question?

Only ALTQ has a way to differentiate between the two because of traffic utilisation:

pf.conf(5)


> Interactive ssh(1) sessions get priority over bulk transfers like scp(1) and sftp(1).  The queues may then be referenced by filtering rules.
> 
> ```
> queue ssh bandwidth 20% cbq(borrow) { ssh_interactive, ssh_bulk }
> ...


----------



## Philippe (Mar 11, 2011)

"Should we just set up an auto-responder that posts 'no' to this question?" => No comment

I thought maybe someone had found a tip for my problem.

I knew for ALTQ.

Thank you for your answers!


----------

