0

I want to execute a script that sets iptable rules on each startup.

I read about the option to write a *.start script to /etc/local.d here, but I cannot execute rc-update add local default to add init.d script to the default runlevel.

But there is no rc-update on my system.

rc-update: command not found

I also consider to write a startup script to /etc/init.d/ as described here but again there is no rc-update on my system

How can I configure a script to execute on startup without rc-update?

What exactly does rc-update?

Can I do the same manually?

  • 1
    I'd suggest using a systemd-service for this. – Fiximan Oct 23 '19 at 9:34
  • I already tried to use a systemd but it is not running on startup. see this post – TVK Oct 23 '19 at 11:17
  • 1
    You should rather go that route, then. basic.target is too early, I think. – Fiximan Oct 23 '19 at 11:39
  • Thx, multi-user.target also didn't work.. any recommendations on later targets? – TVK Oct 23 '19 at 11:42
  • Maybe requires=network.target (or after=). Not too sure about the dependencies of iptables, though. – Fiximan Oct 23 '19 at 11:49

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.