# Start ipguard at Boot



## peterwkc (Oct 20, 2019)

Dear All,

I tried to start ipguard at boot time on /etc/rc.local with content
#!/bin/sh

*ipguard* *-xz* *-u* *300* *bge0*

but it prompt out command not found.

Please help .Thanks.


----------



## gpw928 (Oct 21, 2019)

Is ipguard installed?
	
	



```
find /usr -name ipguard
```
If not, install it, as root:
	
	



```
pkg install ipguard
```
You probably also need to change your script to have /usr/local/sbin in the prevailing PATH:
	
	



```
/usr/local/sbin/ipguard -xz -u 300 bge0
or
PATH=$PATH:/usr/local/sbin; export PATH
ipguard -xz -u 300 bge0
```


----------



## peterwkc (Oct 21, 2019)

Problem solved.


----------



## SirDice (Oct 21, 2019)

peterwkc said:


> I tried to start ipguard at boot time on /etc/rc.local with content


Remove it. There's a proper rc(8) script in /usr/local/etc/rc.d/ipguard.


```
# Add the following lines to /etc/rc.conf to enable ipguard:
#
# ipguard_enable="YES"
# ipguard_interface="iface"
# ipguard_flags="-u 300 -xz"
```


----------

