Is it possible to import a list of static DHCP assignments to the USG FLEX 500 firewall?

J0nas
J0nas Posts: 2
First Anniversary
edited April 2021 in Security
We're switching from OPNsense to the USG FLEX 500 and don't want to manually retype 200+ entries of MAC and IP Adresses + client names. Is there a way to import a predefined list of these entries? I already have the exported list ready, but can't find a way to import it anywhere.
Tagged:

Accepted Solution

  • Zyxel_Joshua
    Zyxel_Joshua Posts: 60  Zyxel Employee
    First Anniversary 10 Comments Friend Collector First Answer
    Answer ✓
    Hi @J0nas,
    There no directly import function on management GUI.
    Here a Windows tool that can help you to generate a CLI script file to import and run it on USG FLEX 500.
    Note: USG FLEX 500 support max. 512 static DHCP entries.

    Follow these steps,
    1.Prepare your mapping list text file (the format you can refer example CSV file in ZIP package) 
    2.Run this tool
    3.Click Browse to loading the mapping file
    4.Edit the interface name (If you want different entries for different IP interface. You need to split the entries into different file. Loading one file, set interface name and generate one by one.) 
    5.Click "Generate zysh script". You will get a "static_dhcp_xxx.zysh" CLI script file.


    Then login to USG FLEX 500 GUI.
    1. Go to Maintenance > File Manager > Shell Script
    2. Browse and upload the CLI script file.
    3. Select the file and click Apply button to run the CLI.

All Replies

  • Zyxel_Joshua
    Zyxel_Joshua Posts: 60  Zyxel Employee
    First Anniversary 10 Comments Friend Collector First Answer
    Answer ✓
    Hi @J0nas,
    There no directly import function on management GUI.
    Here a Windows tool that can help you to generate a CLI script file to import and run it on USG FLEX 500.
    Note: USG FLEX 500 support max. 512 static DHCP entries.

    Follow these steps,
    1.Prepare your mapping list text file (the format you can refer example CSV file in ZIP package) 
    2.Run this tool
    3.Click Browse to loading the mapping file
    4.Edit the interface name (If you want different entries for different IP interface. You need to split the entries into different file. Loading one file, set interface name and generate one by one.) 
    5.Click "Generate zysh script". You will get a "static_dhcp_xxx.zysh" CLI script file.


    Then login to USG FLEX 500 GUI.
    1. Go to Maintenance > File Manager > Shell Script
    2. Browse and upload the CLI script file.
    3. Select the file and click Apply button to run the CLI.

  • JohnK
    JohnK Posts: 10
    First Anniversary Friend Collector First Comment
    edited November 2021
    Does this still work on the latest firmware USG flex 500? It stops working when it added the first ip/mac... then thoes nothing...?
    Uploading a csv to the static dhcp table does nothing either.... Trying to get this fixed for hours without result :-|
  • JohnK
    JohnK Posts: 10
    First Anniversary Friend Collector First Comment
    edited November 2021
    log says: ERROR: #configure terminal ip dhcp pool Static_lan1_64694E1C13D8 ip dhcp pool Static_lan1_9C5C8E6E341F, Parse error/command not found!

    In the terminal the line should be:
    ip dhcp pool Static_lan1_00451DE3DC80
    host 192.168.0.11
    hardware-address 00:45:1D:E3:DC:80
    description wifi1
    exit   <- MIND THE EXIT STATEMENT NOT GENERATED BY THE PROGRAM IN THIS POST
    ip dhcp pool Static_lan1_00451DE36CC0
    host 192.168.0.12
    hardware-address 00:45:1D:E3:6C:C0
    description wifi2
    exit  <- MIND THE EXIT STATEMENT NOT GENERATED BY THE PROGRAM IN THIS POST
    ip dhcp pool Static_lan1_70D37993D1E0
    host 192.168.0.13
    hardware-address 70:D3:79:93:D1:E0
    description wifi3
    exit <- MIND THE EXIT STATEMENT NOT GENERATED BY THE PROGRAM IN THIS POST
    .....
  • Zyxel_Joshua
    Zyxel_Joshua Posts: 60  Zyxel Employee
    First Anniversary 10 Comments Friend Collector First Answer
    Hi @JohnK,
    Thanks for the bug report of the tool. 
    Here the update version for bug fix.

    Any question please let me know.

    BRs,
    Joshua
  • JohnK
    JohnK Posts: 10
    First Anniversary Friend Collector First Comment
    Thanks @Zyxel_Joshua !

Security Highlight