Since I couldn't find a way to do this, I found out how to do this myself.
I've had scammers visiting & posting spam on my Forums (and ddosing), so I used CloudFlare, but that hides their IPs. This will show you how to restore poster's IPs through cloudflare.
This was done on Ubuntu Server 16.04
Go to the root of your web directory where Flarum is installed
Navigate to /vendor/flarum/core/src/Api/Controller
Then find these two files:
CreateDiscussionController.php
CreatePostController.php
On line 64
Change REMOTE_ADDR to HTTP_CF_CONNECTING_IP
For the PostController, change line 65 REMOTE_ADDR to HTTP_CF_CONNECTING_IP
Now try making a test discussion, along with a test reply to make sure it works, click on the time it was posted on which is next to poster's name, and it should have the real IP there.