OPNsense
  • Home
  • Help
  • Search
  • Login
  • Register

  • OPNsense Forum »
  • Archive »
  • 21.7 Legacy Series »
  • DHCPv6 ipv6 - static mappings [solved]
« previous next »
  • Print
Pages: 1 [2]

Author Topic: DHCPv6 ipv6 - static mappings [solved]  (Read 7885 times)

RamSense

  • Hero Member
  • *****
  • Posts: 595
  • Karma: 11
    • View Profile
Re: DHCPv6 ipv6 - static mappings [re-opened]
« Reply #15 on: December 05, 2021, 12:09:01 pm »
Ah, that explains a lot. Hope to get to 22.1 soon :-)

I tried to add a cron in the GUI but I could not find the Command for dhcpdv6 or radvd.
Can you explain how to do this? Sounds like a solution for now while waiting for 22.1 to arrive, or just wait for the 22.1 arrive in januari?
« Last Edit: December 05, 2021, 12:25:54 pm by RamSense »
Logged

marjohn56

  • Hero Member
  • *****
  • Posts: 1701
  • Karma: 179
    • View Profile
Re: DHCPv6 ipv6 - static mappings [re-opened]
« Reply #16 on: December 05, 2021, 04:28:41 pm »
You cannot just add commands to Cron, security within Opnsense prevents this, you first need to create and add an action_*.conf file to '/usr/local/opnsense/service/conf/actions.d'. Each conf file contains the definitions for the commands used by Cron. We want to restart radvd and dhcpdv6, so we need an action file for both; we could create a seperate script that restarts both, but we'll do it individually in this case. Each fie contains the command option, in this case 'restart', the command, the type and descrription:
Code: [Select]
[restart]
command:/usr/local/sbin/pluginctl -s -s dhcpd6 restart
parameters:
type:script
message:restarting dhcpdv6
description:Restart dhcpdv6 service
radvd is the same, but we just replace the relevent bits.


Once we have created the files and they are in the directory we issue the command
#service configd restart
This causes the system to reload the new comands into the system so we can access them from the cron setup. So next goto the cron setup and you should now find the restart_radvd and restart_dhcpdv6 options in the drop down list. I've attached the files to make it easier for you. :)

Logged
OPNsense 24.7 - Qotom Q355G4 - ISP - Squirrel 1Gbps.

Team Rebellion Member - If we've helped you remember to applaud

RamSense

  • Hero Member
  • *****
  • Posts: 595
  • Karma: 11
    • View Profile
Re: DHCPv6 ipv6 - static mappings [re-opened]
« Reply #17 on: December 05, 2021, 05:01:01 pm »
Ah great!
Got the files. Next step adding them to opnsense.

created the file action_radvd.conf and dhcpdv6 while I wasn't able to move the file to opnsense, just did not know how. But it did not work. Than I noticed your file had an added s - actionS_radvd.conf and that worked!
Thanks. I have now 2 cron jobs added with [hours] 6
So I think it will run every 6 hours. Is that the recommended setting?
« Last Edit: December 05, 2021, 05:30:45 pm by RamSense »
Logged

  • Print
Pages: 1 [2]
« previous next »
  • OPNsense Forum »
  • Archive »
  • 21.7 Legacy Series »
  • DHCPv6 ipv6 - static mappings [solved]
 

OPNsense is an OSS project © Deciso B.V. 2015 - 2024 All rights reserved
  • SMF 2.0.19 | SMF © 2021, Simple Machines
    Privacy Policy
    | XHTML | RSS | WAP2