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.
1) Download the program for your operating system (they are native binaries, no need for a Java runtime environment).
config.xml
in the same folder you downloaded to tool intomigrate
new_config.xml
has been createdDone!
The binaries were compiled and tested in these operating systems
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.
staticmap
xml nodesubnet4
xml nodereservations
reservations
xml node from the original config.xml
filenew_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.
If you are a glutton for punishment and you want to compile the code yourself, these instructions will work.
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
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
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
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
If you have any problems that you can't figure out, create an issue and I will be happy to assist.
Create an Issue or a Pull Request if you want to contribute to the project.
2.2.0
2.1.4
2.1.3
2.1.2
new_config.xml
2.1.1
2.1.0
2.0.1
2.0.0
1.0.1
1.0.0