ndejong / pfsense_fauxapi

REST based API interface for pfSense 2.3.x and 2.4.x to facilitate devops
Apache License 2.0
354 stars 61 forks source link

How to get or set static DHCP MAC/IP/Hostname assignments #21

Closed 42Network closed 6 years ago

42Network commented 6 years ago

My apologies if this is the wrong way to ask a question or make a request.

Could your API be made to get or set static DHCP mappings in pfSense?

I have a CSV of mappings I'd like to import and then have pfSense maintain them, using the pfSense Web UI to add/delete.

I'd also like to export the current mappings to a CSV to upload into my remote WiFI access points (running Tomato) so their client lists will accurately reflect the IPs and hostnames of the connected clients.

ndejong commented 6 years ago

Hi - happy to assist if possible

I'd like to break your request down into smaller parts first so it's more clear:- (a) you have a CSV list (perhaps large?) of static DHCP mappings and you'd like to migrate all these mappings to pfSense to then establish it as the source-of-truth for your DHCP mappings (b) you are wondering if pfsense_fauxapi can assist in this data migration task (c) you are wondering if pfsense_fauxapi can provide you a way to get at the data required to generate a CSV that you can then upload into some other network equipment

My sense is that yes you'll be able to achieve all this with pfsense_fauxapi by looking at the data returned by config_get and extracting/inserting data into the pfSense config this way - I've not taken a look at this in particular but it sounds feasible.

42Network commented 6 years ago

Yes, exactly right

On Wed, Jan 31, 2018 at 6:59 PM, ndejong notifications@github.com wrote:

Hi - happy to assist if possible

I'd like to break your request down into smaller parts first so it's more clear:- (a) you have a CSV list (perhaps large?) of static DHCP mappings and you'd like to migrate all these mappings to pfSense to then establish it as the source-of-truth for your DHCP mappings (b) you are wondering if pfsense_fauxapi can assist in this data migration task (c) you are wondering if pfsense_fauxapi can provide you a way to get at the data required to generate a CSV that you can then upload into some other network equipment

My sense is that yes you'll be able to achieve all this with pfsense_fauxapi by looking at the data returned by config_get and extracting/inserting data into the pfSense config this way - I've not taken a look at this in particular but it sounds feasible.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/ndejong/pfsense_fauxapi/issues/21#issuecomment-362122993, or mute the thread https://github.com/notifications/unsubscribe-auth/Aha4qEU1jgbqKIrQEgfSt-_PSv_VnVS9ks5tQQxbgaJpZM4RzaS0 .