Hello,

I recently lost access to a co-located server, because I used a non-standard port for ssh access.

The default pf-ruleset (in /etc/rc) had kicked in.

Would it be more correct to have the rulset in /etc/rc use /etc/services instead of hardcoding port 22 into the rule?

Something like this;

326,327c326,327
< RULES="$RULES\npass in proto tcp from any to any port 22 keep state" < RULES="$RULES\npass out proto { tcp, udp } from any to any port 53 keep state"
---
RULES="$RULES\npass in proto tcp from any to any port ssh keep state" RULES="$RULES\npass out proto { tcp, udp } from any to any port domain keep state"


--
Kind regards
Brian Vangsgaard

Reply via email to