To add another 'possible solution' to the mix, you could create a single html frame on http://www.domainname.com/forum/ that displayed content from the forum website on the other IP. But I feel dirty just suggesting that.
How important is it that you use the /forum URL? As has already been suggested, using a subdomain is the more natural solution.
▌Backup Machine - www.backupmachine.com
▌Automatically backup your website and databases with no software to install
That redirection will replace the Browser's URL address from "http://www.domainname.com/forum/" to "http://188.8.131.52" - It works fine but it doesn't look good as your visitor will see that IP address instead of the sub-folder address
The Single HTML Frame method also works fine, but the URL will stay remain "http://www.domainname.com/forum/" even you browse to other pages/different path on that forum site.
The best solution is to use sub-domain as mentioned by others above.