# PF and FTP: working but requires pf.conf to be reloaded



## Juh924 (Jan 2, 2014)

Hello everybody,

I've been trying for days now to get ftp working while using pf. I got it working about three days ago but every time I reboot my computer, I need to reload the rules via `pfctl -f /etc/pf.conf` to be able to access FreeBSD FTP.

Here are the corresponding lines in /etc/rc.conf:

```
#------ NETWORK ------   
wlans_iwn0="wlan0"
ifconfig_wlan0="mode 11n WPA DHCP"
ifconfig_em0="DHCP"
#------ PACKET FILTER ------
pf_enable="YES"
pflog_enable="YES"
pf_rules="/etc/pf.conf"
#------ FTP-PROXY ------
ftpproxy_enable="YES"
ftpproxy_flags="-r"
```

And my /etc/pf.conf: http://pastebin.com/TcqnXD4k.

Do you have any idea why I have to reload the rules every time I start my computer?

Thank you very much*.*

PS: Do you know how I could put together em0 and wlan0 to avoid having to edit and reload pf every time I switch from WiFi to Ethernet?


----------



## wblock@ (Jan 2, 2014)

pf may be starting before the wireless interface has an IP address from DHCP.  Use SYNCDHCP, or see `man rc.conf | less -p netwait`.


----------



## Juh924 (Jan 3, 2014)

That's working! Thanks a lot.


----------

