During my use of OPNsense, I wanted to do port forwarding for my LibreSpeed speed test tool, but after some searching, I couldn’t find any helpful resources and tutorials about OPNsense, so I decided to write a simple tutorial here to help you configure OPNsense port forwarding.
First, let’s go to Firewall -> NAT -> Port Forward. Then click Add button at the top right corner.
Secondly, change the Destination to WAN address since we want to access LibreSpeed from the WAN interface. Then pick a random port that you want to access your LibreSpeed externally. Here I use 12345 as the port.
Let’s continue on the Port Forward page. My LibreSpeed running as a Docker container in my UNraid server, so the Redirect target IP is the IP address of my LibreSpeed address, in my case, the address is 192.168.1.199. Then Redirect target port is the port that accesses my LibreSpeed which is 6580.
Then you can give it a name as you like, I will call it LibreSpeed to help me remember it. Then keep the remaining settings as the default configuration, hit Save. OPNsense will create firewall rules for us automatically. Finally, Apply changes on the main page to make it live.
Now, you can access your internal sources from the internet by using your IP address and port. If you have a domain name and DDNS setup on your OPNsense, you can easily access your internal page by using your domain name and port, for example, home.example.com:20000
I hope this tutorial can help you a little bit when you explore OPNsense, it is a great firewall system, and I like it a lot! If you want to see more tutorials about OPNsense, leave a comment below. Want to see more fun stuff I made, click HERE to go to the main page.