Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature request: DHCP Server support #244

Open
msoukhomlinov opened this issue Apr 8, 2024 · 3 comments
Open

Feature request: DHCP Server support #244

msoukhomlinov opened this issue Apr 8, 2024 · 3 comments

Comments

@msoukhomlinov
Copy link

It would be great to add support for reading and writing DHCP server configuration.

@alagoutte alagoutte changed the title Feature reqeust: DHCP Server support Feature request: DHCP Server support Apr 8, 2024
@alagoutte
Copy link
Contributor

Hi,

Ok ! for waiting you can get using this API call : api/v2/cmdb/system.dhcp/server with Invoke-FGTRestMethod cmdlet (specialty if it is for add on As Built Report Fortigate report ^^)

For example :

 (Invoke-FGTRestMethod "api/v2/cmdb/system.dhcp/server").results

id                           : 1
q_origin_key                 : 1
status                       : enable
lease-time                   : 604800
mac-acl-default-action       : assign
forticlient-on-net-status    : enable
dns-service                  : specify
dns-server1                  : 1.1.1.1
dns-server2                  : 0.0.0.0
dns-server3                  : 0.0.0.0
dns-server4                  : 0.0.0.0
wifi-ac-service              : specify
wifi-ac1                     : 0.0.0.0
wifi-ac2                     : 0.0.0.0
wifi-ac3                     : 0.0.0.0
ntp-service                  : specify
ntp-server1                  : 0.0.0.0
ntp-server2                  : 0.0.0.0
ntp-server3                  : 0.0.0.0
domain                       :
wins-server1                 : 0.0.0.0
wins-server2                 : 0.0.0.0
default-gateway              : 192.168.44.254
next-server                  : 0.0.0.0
netmask                      : 255.255.255.0
interface                    : internal
ip-range                     : {@{id=1; q_origin_key=1; start-ip=192.168.44.110; end-ip=192.168.44.210;
                               vci-match=disable; vci-string=System.Object[]; uci-match=disable;
                               uci-string=System.Object[]; lease-time=0}}
timezone-option              : default
timezone                     :
tftp-server                  : {}
filename                     :
options                      : {@{id=1; q_origin_key=1; code=60; type=string; value=test; ip=; vci-match=disable;
                               vci-string=System.Object[]; uci-match=disable; uci-string=System.Object[]}}
server-type                  : regular
ip-mode                      : range
conflicted-ip-timeout        : 1800
ipsec-lease-hold             : 60
auto-configuration           : enable
dhcp-settings-from-fortiipam : disable
auto-managed-status          : enable
ddns-update                  : disable
ddns-update-override         : disable
ddns-server-ip               : 0.0.0.0
ddns-zone                    :
ddns-auth                    : disable
ddns-keyname                 :
ddns-key                     : ENC -1z5SC2TX/GcygB4SwNI6f9zwyjkI=
ddns-ttl                     : 300
vci-match                    : disable
vci-string                   : {}
exclude-range                : {}
shared-subnet                : disable
relay-agent                  : 0.0.0.0
reserved-address             : {@{id=1; q_origin_key=1; type=mac; ip=192.168.44.120; mac=c8:e0:eb:xx:xx:xx;
                               action=reserved; circuit-id-type=string; circuit-id=; remote-id-type=string;
                               remote-id=; description=}}

dhcp-server use "id" for each define server "pool"

@alagoutte
Copy link
Contributor

Hi @msoukhomlinov do you need Get cmdlet ? i can look for adding on next (minor) release ?

alagoutte added a commit to alagoutte/PowerFGT that referenced this issue May 4, 2024
For get list of DHCP Server configured on fortigate

Ping: FortiPower#244
alagoutte added a commit that referenced this issue May 13, 2024
For get list of DHCP Server configured on fortigate

Ping: #244
@alagoutte
Copy link
Contributor

it is integred for Get and if there is more request, i can look for add Add/Set/Remove...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants