|
|||
PF block in / block in all
As the title suggests, i'm confused about the difference between the two. I don't get the 'all' keyword, unless it's used for direction (e.g. block all, for in and out). But what meaning does it have when used after the direction?
|
|
|||
block in, block out is used with list of addresses to block from.
Example: Code:
martians = "{ 127.0.0.0/8, 192.168.0.0/16, 172.16.0.0/12, \ 10.0.0.0/8, 169.254.0.0/16, 192.0.2.0/24, \ 0.0.0.0/8, 240.0.0.0/4 }" block in quick on $ext_if from $martians to any block out quick on $ext_if from any to $martians Example: Code:
block in all pass out all keep state |
|
|||
Hmm, but they both do the same thing"
Code:
block in pass out keep state Code:
block in all pass out all keep state |
|
||||
Quote:
Code:
all This is equivalent to ‘from any to any’. |
|
|||
It's interesting to read the PF Faq, particularly the shortcuts for creating ruleset, on the section "Elimination of keywords", it explains to define a default deny policy, to return or drop - it's up to you - and use only:
Code:
block Code:
block in/out Code:
block in/out all
__________________
GPG:Fingerprint ed25519 : 072A 4DA2 8AFD 868D 74CF 9EA2 B85E 9ADA C377 5E8E GPG:Fingerprint rsa4096 : 4E0D 4AF7 77F5 0FAE A35D 5B62 D0FF 7361 59BF 1733 |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
To block Facebook with PF | sabrina | OpenBSD Security | 7 | 18th November 2020 11:19 PM |
pf block command help | newbsdied | OpenBSD Security | 1 | 7th November 2010 12:50 AM |
Block IDM-DAP-P2P | mohammadreza | OpenBSD Security | 5 | 25th February 2010 09:59 AM |
block spam | milo974 | OpenBSD Security | 1 | 26th May 2009 11:30 AM |
Automaticaly block IPs with PF | DNAeon | FreeBSD Installation and Upgrading | 7 | 20th February 2009 02:06 AM |