Home
Help
Search
Login
Register
OPNsense Forum
»
Archive
»
23.1 Legacy Series
»
API for DHCP Static Mapping?
« previous
next »
Print
Pages: [
1
]
Author
Topic: API for DHCP Static Mapping? (Read 1689 times)
tessus
Jr. Member
Posts: 67
Karma: 2
API for DHCP Static Mapping?
«
on:
February 18, 2023, 08:58:54 pm »
I would like to set a DHCP static mapping via a script, but I couldn't find an API call to create such a mapping.
How can I automate this? e.g. I want to create a static DHCP mapping for interface ABC.
Logged
tessus
Jr. Member
Posts: 67
Karma: 2
Re: API for DHCP Static Mapping?
«
Reply #1 on:
March 02, 2023, 07:17:01 am »
Anyone?
Is this idea so strange or does nobody know? e.g. how do you set the DHCP mapping after one used terraform to create a VM? I can automate everything, except apparently creating a static DHCP mapping.
Did nobody ever come across the same issue?
Logged
tessus
Jr. Member
Posts: 67
Karma: 2
Re: API for DHCP Static Mapping?
«
Reply #2 on:
March 23, 2023, 09:33:19 pm »
Sorry to bump this again. I am ok with someone telling me that it is not possible, but why does nobody answer?
Does really nobody know? Not even the OPNsense devs?
Logged
opnsense-user123
Newbie
Posts: 25
Karma: 2
Re: API for DHCP Static Mapping?
«
Reply #3 on:
March 23, 2023, 10:17:05 pm »
This might be a bad idea ... but you might be able to export and modify the config file and re-import the required parts to change the DHCP server config.
Logged
tessus
Jr. Member
Posts: 67
Karma: 2
Re: API for DHCP Static Mapping?
«
Reply #4 on:
March 23, 2023, 11:15:28 pm »
Hmm, this might work, iff that applying can be done via an API, otherwise I am back to square one.
Logged
Fright
Hero Member
Posts: 1777
Karma: 164
Re: API for DHCP Static Mapping?
«
Reply #5 on:
March 24, 2023, 06:54:17 am »
@tessus
at the moment there is no api endpoints for dhcp leases (legacy pages are used). but it looks like there are plans for MVC migration (
https://github.com/opnsense/core/issues/6380
) IIUC. then api endpoints will appear
Logged
tessus
Jr. Member
Posts: 67
Karma: 2
Re: API for DHCP Static Mapping?
«
Reply #6 on:
March 24, 2023, 11:35:12 pm »
Great. Thanks for the info. This is indeed great news.
Logged
Print
Pages: [
1
]
« previous
next »
OPNsense Forum
»
Archive
»
23.1 Legacy Series
»
API for DHCP Static Mapping?