# How to specify all local IP addresses? (interface name unknown during boot)



## macfreek (Sep 20, 2013)

I have a small FreeBSD router and firewall and am moving from IPFW to PF. The main strategy is as follows: block all traffic, except from the NAT'ed network, and the host itself. In IPFW I used the following rule to allow traffic from the host to the rest of the world:


```
ipfw -q allow ip from me to any keep-state
```

In PF I use the following rule to allow traffic from the host to the rest of the world:


```
wan_if = "em1"
dmz_if = "em2"
lan_if = "em3"
six_if = "tun0"
vpn_if = "tun1"
table <selfnetwork> { $wan_if, $dmz_if, $lan_if, $six_if, $vpn_if }
pass from <selfnetwork> to any keep state
```

This seems to work fine... except when the rules are loaded during a boot of my device:


```
Enabling pf
no IP address found for tun0
/etc/pf.conf:29: could not parse host specification
pfctl: Syntax error in config file: pf rules not loaded
```

Line 29 contains the table specification. It seems that either tun0 or tun1 does not yet exist at the time PF is loaded, and PF balks and refused to load the rules. (tun0 is created by Aiccu, tun1 is created by OpenVPN.)

If you have advice how to work around this, I sure appreciate that!


----------

