# Some basic pf questions



## Understudy (Dec 26, 2011)

Hi,

Is the :

```
icmp_types = "{ echoreq, unreach }"  # allow ping
```
considered a table or a macro?

Sincerely,
Brendhan


----------



## vand777 (Dec 26, 2011)

It is a macro.

Some information about tables: http://www.openbsd.org/faq/pf/tables.html. This FAQ helped me some time ago when I was learning PF.


----------



## vand777 (Dec 26, 2011)

The Book of PF: A No-Nonsense Guide to the OpenBSD Firewall


----------



## Understudy (Dec 26, 2011)

vand777 said:
			
		

> It is a macro.
> 
> Some information about tables: http://www.openbsd.org/faq/pf/tables.html. This FAQ helped me some time ago when I was learning PF.



Thanks I have been looking through that. I risked asking the question because I could not get an answer that seemed to be direct about it. Thank you.


----------



## SirDice (Dec 28, 2011)

It's mentioned in pf.conf(5):

```
MACROS
     Macros can be defined that will later be expanded in context.  Macro
     names must start with a letter, and may contain letters, digits and
     underscores.  Macro names may not be reserved words (for example pass,
     in, out).  Macros are not expanded inside quotes.

     For example,

           ext_if = "kue0"
           [b]all_ifs = "{" $ext_if lo0 "}"[/b]
           pass out on $ext_if from any to any
           pass in  on $ext_if proto tcp from any to any port 25
```


----------

