Coder Social home page Coder Social logo

easyg0ing1 / migration Goto Github PK

View Code? Open in Web Editor NEW
24.0 2.0 0.0 18.94 MB

Migration is a tool to assist with migrating your OPNsense DHCP static mappings over to the new Kea DHCP server that comes with version 24 of OPNsense.

Java 94.20% Shell 2.55% Batchfile 3.25%
dhcpcd kea-dhcpd opnsense opnsense-install isc-dhcp-server

migration's Introduction

Migration

Migration is a utility that will take your static IP address mappings in OPNsense and migrate them over to the Kea DHCP server that comes with OPNsense version 24.

  • You must upgrade to OPNsense version 24 before using this utility

Here is a video tutorial if that works best for you

This is a simple tool to use:

  1. Download the program for your operating system (they are native binaries, no need for a Java runtime environment).
    • Create a clean folder to put the program in
  2. From your OPNsense interface, go to Services / Kea DHCP / Kea DHCPv4 Then Subnets on the right
  3. Define all of your subnets and their IP Pools.
    • The tool uses those newly created subnets to automatically assign your current reservations to the correct subnet.
  4. Apply those changes
  5. Go to System / Configuration / Backups
  6. Click on Download Configuration
    • Save the file as config.xml in the same folder you downloaded to tool into
    • Make a copy of it just in case
  7. Open a shell (cmd.exe or terminal etc.) and go into that folder
  8. run migrate
    • You should see that the file new_config.xml has been created
    • If you don't then you will see a description of some problem that was found which will help you understand what needs to be fixed in your config.xml file
  9. Go back into OPNsense under backups and restore this new file.
    • Make sure you UNCKECK the box that says Reboot after restore

Done!

The binaries were compiled and tested in these operating systems

  • Windows 11 (build 21996.1)
  • MacOS Sonoma 14.2.1
  • Ubuntu 22.0.4 LTS (Jammy Jellyfish)

With MacOS or Linux you might need to set the program as executable

chmod +x migrate

No guarantees with older versions of these operating systems.

Summary of what this utility does

  • Loads config.xml into memory
  • Loads existing static maps into memory from the staticmap xml node
  • Loads the Kea subnets from the subnet4 xml node
  • Iterates through each static mapping
    • Compares each IP address with the Kea Subnets you created looking for a match
    • Creates a new Kea DHCP static mapping using the subnet UUID from the matched subnet
    • Assigns a new random UUID to the new static map for Kea
  • Converts the new mappings into xml under the node name reservations
  • Replaces the reservations xml node from the original config.xml file
  • Saves the modified xml to a new file named new_config.xml

Every step along the way is checked for problems and if any are found, the program tells you exactly what you need to look for to settle the problem.

Compiling

If you are a glutton for punishment and you want to compile the code yourself, these instructions will work.

Windows

Click Here to learn how to setup the Windows build environment

After following those instructions, you should have made the github folder off the root. If not:

mkdir C:\github

Next

cd C:\github
git clone https://github.com/EasyG0ing1/Migration.git
cd Migration\compile
compile.bat

It could take anywhere from a minute to ten minutes or longer to compile the native image depending on your CPU and how much RAM you have. Be patient!

The executable will be here C:\github\Migration\target\migrate.exe

MacOS and Linux

  • First, install SDK Man
curl -s "https://get.sdkman.io" | bash
  • It will give you a command to copy and paste into terminal that will source the config, or simply restart your terminal.
  • Next, install GraalVM v21
sdk install java 21.0.2-graal

(this takes about a minute-ish)

  • Install Maven
    • Pick a folder to hold the maven file tree
    • Go into that folder
cd /My/Folder
wget https://dlcdn.apache.org/maven/maven-3/3.9.6/binaries/apache-maven-3.9.6-bin.zip
unzip apache-maven-3.9.6-bin.zip
mv apache-maven-3.9.6 maven3.9.6
  • Edit whatever file you use to run exports when your shell starts and add
export PATH="/My/Path/To/maven3.9.6/bin":$PATH
  • Run that command in your terminal too so that you don't need to restart terminal
  • Run this and expect the output shown here
mvn --version

Output

Apache Maven 3.9.6
Maven home: /My/Path/To/maven3.9.6/libexec
Java version: 21, vendor: Oracle Corporation, runtime: /Library/Java/JavaVirtualMachines/graalvm-jdk-21+35.1/Contents/Home
  • If you're using MacOS and you DON'T have the xcode command line tools installed, run this
xcode-select install
  • And it will take a LOOOONG time to finish - possibly up to 20 minutes or longer. Get some coffee or water or popcorn ...
  • If you're using Linux, then you need to install this
sudo apt update
sudo apt install build-essential libz-dev zlib1g-dev -y
  • This won't take too long to install
    • We're back to ALL OS's from here
  • Next, go into a folder you can clone this repository into then
git clone https://github.com/EasyG0ing1/Migration.git
cd Migration
chmod +x compile.sh
./compile.sh
ls -l target
  • It can take some time to build the native-image. On a 2019 MBP it takes about a minute. On older hardware it can take up to 10 minutes or more, it depends on your CPU and how much RAM you have. Just be patient, if there is a problem, it will throw an error and dump out so if that didn't happen, then it's working.
  • You should see the migrate binary in the target folder.
  • You may need to set it as executable
chmod +x target/migrate

Issues

If you have any problems that you can't figure out, create an issue and I will be happy to assist.

Contributing

Create an Issue or a Pull Request if you want to contribute to the project.

Updates

  • 2.2.0

    • Cleaned up code to simplify
    • Removed unused pojos
    • Added enums Package
    • Added migrate Package
    • Added Migrate class
    • Cleaned up Message class and removed unused objects
    • Added Mode enum
  • 2.1.4

    • Modified handling of ISC DHCP mappings when no MAC address exists where a CID value is provided
    • Updated the static mapping error messages so that they include relevant details from the static map, making it easier to locate the record for correction
  • 2.1.3

    • Minor changes to code structure
  • 2.1.2

    • Fixed problem where xml tags were in the wrong case in the new_config.xml
  • 2.1.1

    • Added clear and expanded error messages so that any problems that might happen should always present the user with a clear and exact cause of the problem along with instructions explaining how to correct the problem
  • 2.1.0

    • Removed the need to run a check before doing the migration
    • Users will get specific feedback if there are any problems which will let them know exactly what is wrong if there are any problems with the migration.
  • 2.0.1

    • Minor enhancements
  • 2.0.0

    • Streamlined use of XML library, eliminating unnecessary calls.
    • Program now outputs a file that can be directly imported into OPNsense
  • 1.0.1

    • Added more detailed error reporting
  • 1.0.0

    • Initial Release

migration's People

Contributors

easyg0ing1 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

migration's Issues

Error in Linux - XML Node: <mac> Could not be found

Hi,

Getting an error when running the tool.

Problem:
       XML Node: <mac>
       Could not be found

  Thoughts:
       This node is supposed to exist within each section in the config.xml file that is tagged
       with <staticmap></staticmap>. Please look through your config.xml file and search for
       `<staticmap` (without the tick marks) and make sure each one has an assigned and valid
        mac address.

Here is a slightly snipped and redacted version of the config.xml:

<?xml version="1.0"?>
<opnsense>
  <!-- SNIP -->
  <dhcpd>
    <lan>
      <enable>1</enable>
      <domain>REDACTED.NET</domain>
      <ddnsdomainalgorithm>hmac-md5</ddnsdomainalgorithm>
      <numberoptions>
        <item/>
      </numberoptions>
      <range>
        <from>192.168.1.100</from>
        <to>192.168.1.199</to>
      </range>
      <winsserver/>
      <dnsserver/>
      <ntpserver/>
      <staticmap>
        <mac>04:7c:16:6d:dc:d2</mac>
        <ipaddr>192.168.1.2</ipaddr>
        <hostname>Monty</hostname>
        <winsserver/>
        <dnsserver/>
        <ntpserver/>
      </staticmap>
      <staticmap>
        <mac>18:e8:29:48:7d:2f</mac>
        <ipaddr>192.168.1.3</ipaddr>
        <hostname>UnderstairsSwitch</hostname>
        <winsserver/>
        <dnsserver/>
        <ntpserver/>
      </staticmap>
      <staticmap>
        <mac>b4:fb:e4:8b:3a:f1</mac>
        <ipaddr>192.168.1.4</ipaddr>
        <hostname>UnderstairsAP</hostname>
        <winsserver/>
        <dnsserver/>
        <ntpserver/>
      </staticmap>
      <staticmap>
        <mac>74:83:c2:0c:1a:7f</mac>
        <ipaddr>192.168.1.5</ipaddr>
        <hostname>LoftSwitch</hostname>
        <winsserver/>
        <dnsserver/>
        <ntpserver/>
      </staticmap>
      <staticmap>
        <mac>74:83:c2:0c:1a:80</mac>
        <ipaddr>192.168.1.6</ipaddr>
        <hostname>LoungeSwitch</hostname>
        <winsserver/>
        <dnsserver/>
        <ntpserver/>
      </staticmap>
      <staticmap>
        <mac>74:83:c2:0c:1a:f7</mac>
        <ipaddr>192.168.1.7</ipaddr>
        <hostname>PlayroomSwitch</hostname>
        <winsserver/>
        <dnsserver/>
        <ntpserver/>
      </staticmap>
      <staticmap>
        <mac>f4:92:bf:aa:c2:5c</mac>
        <ipaddr>192.168.1.8</ipaddr>
        <hostname>GarageAP</hostname>
        <winsserver/>
        <dnsserver/>
        <ntpserver/>
      </staticmap>
      <staticmap>
        <cid>MariaDB</cid>
        <ipaddr>192.168.1.10</ipaddr>
        <hostname>MariaDB</hostname>
        <winsserver/>
        <dnsserver/>
        <ntpserver/>
      </staticmap>
      <staticmap>
        <cid>Homebridge</cid>
        <ipaddr>192.168.1.12</ipaddr>
        <hostname>Homebridge</hostname>
        <winsserver/>
        <dnsserver/>
        <ntpserver/>
      </staticmap>
      <staticmap>
        <mac>52:54:00:3e:c2:cf</mac>
        <ipaddr>192.168.1.13</ipaddr>
        <hostname>WinDocker01</hostname>
        <winsserver/>
        <dnsserver/>
        <ntpserver/>
      </staticmap>
      <staticmap>
        <mac>40:6c:8f:b9:af:84</mac>
        <ipaddr>192.168.1.20</ipaddr>
        <hostname>Otto</hostname>
        <descr>Innermost interface on the Mac Pro</descr>
        <winsserver/>
        <dnsserver/>
        <ntpserver/>
      </staticmap>
      <staticmap>
        <mac>40:6c:8f:b9:88:bf</mac>
        <ipaddr>192.168.1.21</ipaddr>
        <hostname>Otto2</hostname>
        <descr>Outermost interface on the Mac Pro</descr>
        <winsserver/>
        <dnsserver/>
        <ntpserver/>
      </staticmap>
      <staticmap>
        <mac>00:1f:29:60:2a:dd</mac>
        <ipaddr>192.168.1.22</ipaddr>
        <hostname>Stampy</hostname>
        <descr>Port 3 on Monty's ethernet card</descr>
        <winsserver/>
        <dnsserver/>
        <ntpserver/>
      </staticmap>
      <staticmap>
        <mac>4c:20:b8:ab:25:d6</mac>
        <ipaddr>192.168.1.24</ipaddr>
        <hostname>Wiggum</hostname>
        <winsserver/>
        <dnsserver/>
        <ntpserver/>
      </staticmap>
      <staticmap>
        <mac>84:3a:4b:6a:05:d8</mac>
        <ipaddr>192.168.1.25</ipaddr>
        <hostname>Patty</hostname>
        <winsserver/>
        <dnsserver/>
        <ntpserver/>
      </staticmap>
      <staticmap>
        <mac>00:0e:c6:fe:24:4f</mac>
        <ipaddr>192.168.1.26</ipaddr>
        <hostname>A00173_USB</hostname>
        <descr>USB ethernet adapter</descr>
        <winsserver/>
        <dnsserver/>
        <ntpserver/>
      </staticmap>
      <staticmap>
        <mac>3c:a6:f6:36:e2:6e</mac>
        <ipaddr>192.168.1.27</ipaddr>
        <hostname>Partners-Air</hostname>
        <winsserver/>
        <dnsserver/>
        <ntpserver/>
      </staticmap>
      <staticmap>
        <mac>f8:4d:89:67:29:69</mac>
        <ipaddr>192.168.1.28</ipaddr>
        <hostname>Bart_wireless</hostname>
        <descr>Bart (WiFi)</descr>
        <winsserver/>
        <dnsserver/>
        <ntpserver/>
      </staticmap>
      <staticmap>
        <mac>c8:7f:54:67:62:dd</mac>
        <ipaddr>192.168.1.29</ipaddr>
        <hostname>Krusty</hostname>
        <winsserver/>
        <dnsserver/>
        <ntpserver/>
      </staticmap>
      <staticmap>
        <mac>5e:77:a3:4f:ee:66</mac>
        <ipaddr>192.168.1.50</ipaddr>
        <hostname>iPad</hostname>
        <winsserver/>
        <dnsserver/>
        <ntpserver/>
      </staticmap>
      <staticmap>
        <mac>00:18:dd:25:24:46</mac>
        <ipaddr>192.168.1.60</ipaddr>
        <hostname>HDHomeRun</hostname>
        <winsserver/>
        <dnsserver/>
        <ntpserver/>
      </staticmap>
      <pool/>
    </lan>
    <opt1>
      <enable>1</enable>
      <domain>REDACTED.NET</domain>
      <ddnsdomainalgorithm>hmac-md5</ddnsdomainalgorithm>
      <numberoptions>
        <item/>
      </numberoptions>
      <range>
        <from>192.168.3.100</from>
        <to>192.168.3.199</to>
      </range>
      <winsserver/>
      <dnsserver/>
      <ntpserver/>
      <staticmap>
        <mac>7c:ed:8d:1c:41:4c</mac>
        <hostname>Xbox360</hostname>
        <winsserver/>
        <dnsserver/>
        <ntpserver/>
      </staticmap>
      <staticmap>
        <mac>04:7c:16:6d:dc:d2</mac>
        <ipaddr>192.168.3.2</ipaddr>
        <hostname>Monty</hostname>
        <winsserver/>
        <dnsserver/>
        <ntpserver/>
      </staticmap>
      <staticmap>
        <cid>TimeMachine</cid>
        <ipaddr>192.168.3.3</ipaddr>
        <hostname>TimeMachine</hostname>
        <descr>TimeMachine docker on unRAID</descr>
        <winsserver/>
        <dnsserver/>
        <ntpserver/>
      </staticmap>
      <staticmap>
        <mac>52:54:00:3e:c2:cf</mac>
        <ipaddr>192.168.3.4</ipaddr>
        <hostname>WinDocker01</hostname>
        <winsserver/>
        <dnsserver/>
        <ntpserver/>
      </staticmap>
      <staticmap>
        <cid>Minecraft Docker</cid>
        <ipaddr>192.168.3.5</ipaddr>
        <hostname>MinecraftDocker</hostname>
        <winsserver/>
        <dnsserver/>
        <ntpserver/>
      </staticmap>
      <staticmap>
        <mac>e0:bb:9e:ab:c9:e5</mac>
        <ipaddr>192.168.3.10</ipaddr>
        <hostname>Eppy</hostname>
        <winsserver/>
        <dnsserver/>
        <ntpserver/>
      </staticmap>
      <staticmap>
        <mac>40:6c:8f:b9:88:bf</mac>
        <ipaddr>192.168.3.11</ipaddr>
        <hostname>Otto3</hostname>
        <descr>Otto (Outermost NIC)</descr>
        <winsserver/>
        <dnsserver/>
        <ntpserver/>
      </staticmap>
      <staticmap>
        <mac>f8:4d:89:67:29:69</mac>
        <ipaddr>192.168.3.12</ipaddr>
        <hostname>Bart</hostname>
        <winsserver/>
        <dnsserver/>
        <ntpserver/>
      </staticmap>
      <staticmap>
        <mac>20:c1:9b:99:0b:83</mac>
        <ipaddr>192.168.3.13</ipaddr>
        <hostname>WORKLAPTOP</hostname>
        <descr>Partner's work laptop</descr>
        <winsserver/>
        <dnsserver/>
        <ntpserver/>
      </staticmap>
      <staticmap>
        <mac>3c:a6:f6:36:e2:6e</mac>
        <ipaddr>192.168.3.14</ipaddr>
        <hostname>Partners-Air</hostname>
        <winsserver/>
        <dnsserver/>
        <ntpserver/>
      </staticmap>
      <staticmap>
        <mac>c8:7f:54:67:62:dd</mac>
        <ipaddr>192.168.3.15</ipaddr>
        <hostname>Krusty</hostname>
        <winsserver/>
        <dnsserver/>
        <ntpserver/>
      </staticmap>
      <staticmap>
        <mac>00:be:43:33:af:5b</mac>
        <ipaddr>192.168.3.16</ipaddr>
        <hostname>WORKLAPTOP</hostname>
        <winsserver/>
        <dnsserver/>
        <ntpserver/>
      </staticmap>
      <staticmap>
        <mac>48:e7:da:2b:52:7d</mac>
        <ipaddr>192.168.3.17</ipaddr>
        <hostname>SantasLilHelper</hostname>
        <winsserver/>
        <dnsserver/>
        <ntpserver/>
      </staticmap>
      <staticmap>
        <mac>b4:e6:2a:cc:96:aa</mac>
        <ipaddr>192.168.3.20</ipaddr>
        <hostname>LG_TV</hostname>
        <winsserver/>
        <dnsserver/>
        <ntpserver/>
      </staticmap>
      <staticmap>
        <mac>1c:12:b0:a7:da:06</mac>
        <ipaddr>192.168.3.21</ipaddr>
        <hostname>Firestick4k</hostname>
        <winsserver/>
        <dnsserver/>
        <ntpserver/>
      </staticmap>
      <staticmap>
        <mac>64:b5:c6:18:2d:71</mac>
        <ipaddr>192.168.3.30</ipaddr>
        <hostname>NintendoSwitch</hostname>
        <winsserver/>
        <dnsserver/>
        <ntpserver/>
      </staticmap>
      <staticmap>
        <mac>84:57:33:94:a1:af</mac>
        <ipaddr>192.168.3.31</ipaddr>
        <hostname>PlayroomX</hostname>
        <descr>Xbox One X Ethernet</descr>
        <winsserver/>
        <dnsserver/>
        <ntpserver/>
      </staticmap>
      <staticmap>
        <mac>70:bc:10:10:7e:e9</mac>
        <ipaddr>192.168.3.32</ipaddr>
        <hostname>LoungeS</hostname>
        <descr>Xbox One S Ethernet</descr>
        <winsserver/>
        <dnsserver/>
        <ntpserver/>
      </staticmap>
      <staticmap>
        <mac>70:bc:10:10:7e:eb</mac>
        <ipaddr>192.168.3.33</ipaddr>
        <hostname>LOUNGE-S-Wireless</hostname>
        <winsserver/>
        <dnsserver/>
        <ntpserver/>
      </staticmap>
      <staticmap>
        <mac>d8:e2:df:34:0d:1f</mac>
        <ipaddr>192.168.3.34</ipaddr>
        <hostname>XBOX-Series-X</hostname>
        <winsserver/>
        <dnsserver/>
        <ntpserver/>
      </staticmap>
      <staticmap>
        <mac>14:60:cb:18:10:b1</mac>
        <ipaddr>192.168.3.40</ipaddr>
        <hostname>Kid1s-iPhone</hostname>
        <winsserver/>
        <dnsserver/>
        <ntpserver/>
      </staticmap>
      <staticmap>
        <mac>44:35:83:71:31:a8</mac>
        <ipaddr>192.168.3.41</ipaddr>
        <hostname>Partners-iPhone</hostname>
        <winsserver/>
        <dnsserver/>
        <ntpserver/>
      </staticmap>
      <staticmap>
        <mac>a4:cf:99:28:d4:1d</mac>
        <ipaddr>192.168.3.42</ipaddr>
        <hostname>My-iPhone</hostname>
        <winsserver/>
        <dnsserver/>
        <ntpserver/>
      </staticmap>
      <staticmap>
        <mac>08:8e:dc:86:5f:36</mac>
        <ipaddr>192.168.3.43</ipaddr>
        <hostname>Partnersione12Pro</hostname>
        <winsserver/>
        <dnsserver/>
        <ntpserver/>
      </staticmap>
      <staticmap>
        <mac>12:05:d2:02:31:ed</mac>
        <ipaddr>192.168.3.44</ipaddr>
        <hostname>Kid2s-iPhone</hostname>
        <winsserver/>
        <dnsserver/>
        <ntpserver/>
      </staticmap>
      <staticmap>
        <mac>60:8c:4a:84:47:87</mac>
        <ipaddr>192.168.3.50</ipaddr>
        <hostname>iPad</hostname>
        <winsserver/>
        <dnsserver/>
        <ntpserver/>
      </staticmap>
      <staticmap>
        <mac>e4:58:e7:46:ec:66</mac>
        <ipaddr>192.168.3.51</ipaddr>
        <hostname>Kid2s-Tablet</hostname>
        <winsserver/>
        <dnsserver/>
        <ntpserver/>
      </staticmap>
      <staticmap>
        <mac>94:9f:3e:e0:6b:f4</mac>
        <ipaddr>192.168.3.60</ipaddr>
        <hostname>SonosZP</hostname>
        <winsserver/>
        <dnsserver/>
        <ntpserver/>
      </staticmap>
      <staticmap>
        <mac>a4:4e:31:b5:55:1c</mac>
        <ipaddr>192.168.3.70</ipaddr>
        <hostname>MIKE_THINKPAD</hostname>
        <winsserver/>
        <dnsserver/>
        <ntpserver/>
      </staticmap>
      <pool/>
    </opt1>
    <opt2>
      <ddnsdomainalgorithm>hmac-md5</ddnsdomainalgorithm>
      <numberoptions>
        <item/>
      </numberoptions>
      <range>
        <from>192.168.10.200</from>
        <to>192.168.10.245</to>
      </range>
      <winsserver/>
      <dnsserver/>
      <ntpserver/>
    </opt2>
    <opt3>
      <enable>1</enable>
      <ddnsdomainalgorithm>hmac-md5</ddnsdomainalgorithm>
      <numberoptions>
        <item/>
      </numberoptions>
      <range>
        <from>192.168.10.100</from>
        <to>192.168.10.199</to>
      </range>
      <winsserver/>
      <dnsserver/>
      <ntpserver/>
      <staticmap>
        <mac>04:7c:16:6d:dc:d2</mac>
        <ipaddr>192.168.10.2</ipaddr>
        <hostname>Monty</hostname>
        <winsserver/>
        <dnsserver/>
        <ntpserver/>
      </staticmap>
      <pool/>
    </opt3>
    <opt6>
      <enable>1</enable>
      <ddnsdomainalgorithm>hmac-md5</ddnsdomainalgorithm>
      <numberoptions>
        <item/>
      </numberoptions>
      <range>
        <from>192.168.11.100</from>
        <to>192.168.11.199</to>
      </range>
      <winsserver/>
      <dnsserver/>
      <ntpserver/>
      <staticmap>
        <mac>04:7c:16:6d:dc:d2</mac>
        <ipaddr>192.168.11.2</ipaddr>
        <hostname>Monty</hostname>
        <winsserver/>
        <dnsserver/>
        <ntpserver/>
      </staticmap>
      <pool/>
    </opt6>
    <opt7>
      <enable>1</enable>
      <ddnsdomainalgorithm>hmac-md5</ddnsdomainalgorithm>
      <numberoptions>
        <item/>
      </numberoptions>
      <range>
        <from>192.168.12.100</from>
        <to>192.168.12.199</to>
      </range>
      <winsserver/>
      <dnsserver/>
      <ntpserver/>
      <staticmap>
        <mac>04:7c:16:6d:dc:d2</mac>
        <ipaddr>192.168.12.2</ipaddr>
        <hostname>Monty</hostname>
        <winsserver/>
        <dnsserver/>
        <ntpserver/>
      </staticmap>
      <pool/>
    </opt7>
    <opt9>
      <enable>1</enable>
      <domain>REDACTED.NET</domain>
      <ddnsdomainalgorithm>hmac-md5</ddnsdomainalgorithm>
      <numberoptions>
        <item/>
      </numberoptions>
      <range>
        <from>192.168.2.100</from>
        <to>192.168.2.199</to>
      </range>
      <winsserver/>
      <dnsserver/>
      <ntpserver/>
      <staticmap>
        <mac>04:7c:16:6d:dc:d2</mac>
        <ipaddr>192.168.2.2</ipaddr>
        <hostname>Monty</hostname>
        <winsserver/>
        <dnsserver/>
        <ntpserver/>
      </staticmap>
      <staticmap>
        <mac>9c:b6:d0:97:6f:d9</mac>
        <ipaddr>192.168.2.10</ipaddr>
        <hostname>A00173</hostname>
        <winsserver/>
        <dnsserver/>
        <ntpserver/>
      </staticmap>
      <staticmap>
        <mac>04:e8:b9:6b:fe:db</mac>
        <ipaddr>192.168.2.11</ipaddr>
        <hostname>A00331</hostname>
        <winsserver/>
        <dnsserver/>
        <ntpserver/>
      </staticmap>
    </opt9>
  </dhcpd>
  <!-- SNIP -->
</opnsense>

I'm guessing might be that first slightly odd entry for the 192.168.10.0/24 subnet.

I'll doublecheck the ISC settings for it I guess.

Cheers

Getting error in both Linux and Windows versions

Getting the following on Win11 and Ubuntu Server 22.04LTS, encountered during the migrate portion, check runs fine. Fresh install of Ubuntu.

Your config file has the necessary information to do the migration.
Exception in thread "main" java.lang.NullPointerException
at com.simtechdata.App.main(App.java:59)
at [email protected]/java.lang.invoke.LambdaForm$DMH/sa346b79c.invokeStaticInit(LambdaForm$DMH)


OPNsense 24.1.3_1-amd64
FreeBSD 13.2-RELEASE-p10
OpenSSL 3.0.13

No IP in <static mapping>, error.

Tried running the binary but I get this error that tells me to review the XML file for empty static mappings.

I reviewed the file and couldn't not see any empty staticmappings. Just wondering if you can add a blurb to the logs for which line or which interface the config error is on?

Thanks for your work!

Error when DHCP has no Static Mappings

Windows Binary 2.1.4

If you have a Subnet with DHCP Enabled but no Static mapping, the tool will error out on the following entry in the config file.

<staticmap/>

This will result in the static mapping error with these details.

   Mac:         NONE
   CID:         NONE
   Hostname:    NONE
   Description: NONE

Removing the line from the file corrects the issue and allows the tool to process the source config file.

Run Successfully but does not add Kea DHCP reservations

I am running into an interesting problem where the migrate program runs successfully (no error codes or messages) on Windows 11 Pro Build 22631 but the new_config.xml does not have any Kea DHCP reservations from ISC DHCP.

I'm happy to share my opnsense config.xml and the new_config.xml via email for you to validate if that helps.

Here's an example of one of my ISC DHCP reservations:

      <staticmap>
        <mac>a0:3d:6f:66:b8:18</mac>
        <ipaddr>192.168.1.110</ipaddr>
        <hostname>Wave-AIR-CAP3702I-AP01</hostname>
        <descr>Cisco WAP #1</descr>
        <winsserver/>
        <dnsserver/>
        <ntpserver/>
      </staticmap>

OPNsense version: 24.1.4 (amd64)

Thanks for your help.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.