To add to all of this, you need to port forward 8777. You don't need to port forward 8666 since 8666 is only local to your server. 8777 is what needs to be opened so its open with respect to your IP address. Also your file has to be like this:
[blue-iris]
accept = 8777
connect = 8666
cert =...