1 |
On 2020-08-14 22:17-0000 Grant Edwards <grant.b.edwards@×××××.com> |
2 |
wrote: |
3 |
|
4 |
> […] |
5 |
> ### "rc-service iptables" vs. "/etc/init.d/iptables" |
6 |
|
7 |
rc-service runs the same service scripts that are in /etc/init.d/, so |
8 |
it's the same. However the manpage of rc-service(8) mentions that |
9 |
“Service scripts could be in different places on different systems”, so |
10 |
the most compatible way would be to use rc-service. |
11 |
|
12 |
> […] |
13 |
> At the top of the page, rules are loaded by adding 'iptables' to the |
14 |
> runlevel 'default', while at the bottom of the page, the 'boot' |
15 |
> runlevel is used instead. |
16 |
> |
17 |
> Is there some significance to these differences? |
18 |
|
19 |
I would use the same runlevel I use for net.*. iptables will always be |
20 |
started before net.*, see depend() in /etc/init.d/iptables. |
21 |
Note that, if you set rc_depend_strict="NO" in /etc/rc.conf, the |
22 |
dependency “net” is satisfied if only one net.* service is started. In |
23 |
this case you may want to but iptables in ‘boot’ and net.* in ‘default’. |
24 |
|
25 |
Kind regards, tastytea |