IPB is one of many scripts that (assuming you're in the correct mode) gets its data from the URI, and all you need to do regarding rewrite rules is to point to index.php. Thus scripts of this type all use the same config in nginx:
Supposing the forum is in a directory /forum. This must be after any parent directories' location blocks (e.g. /) or they will take priority. I believe this only works in nginx 0.7+, as earlier versions don't have the try_files command.
location /forum/ {
index index.php;
try_files $uri $uri/ /forum$uri;
}
In IPB3 there are three URI modes:
With "Use .htaccess mod_rewrite" enabled, you need the above config and fully friendly URIs are used.
/forum/topic/1-default-topic/
With the above disabled and "URL type" set to "Path info", no config is required, but index.php is added to the FURL. This may not work in some Apache setups, but nginx has no trouble with it.
/forum/index.php/topic/1-default-topic/
With mod_rewrite disabled and "URL type" set to "Query string", no config is required, but index.php? is added to the FURL. This is the most compatible option, but also the least friendly.
/forum/index.php?/topic/1-default-topic/