One requirement that you don't have listed is that the generator $g$ needs to generate a subgroup that's of a large prime order; here's what can go wrong if that is not true:
If the order of $g$ (which we call $q$) has a factor $r$, then the attacker can, hearing $g^x$, determine $x \bmod r$ in $O(\sqrt{r})$ time. If $r$ isn't large, this immediately implies that you're leaking data
Worse yet, if the order $r$ is smooth (has no large factors), that makes the DLOG problem easy.
One strategy is, as mandragoe suggests, is look for a prime $p$ with $(p-1)/2$ prime as well. There is certainly a lot to like about this strategy; you can use (say) $g=2$, which can make the computation easier (and if the order of $g$ happens to be $2q$, all that means is that the attacker can learn the lsbit of your DH private values, which really doesn't tell him much, and you can avoid even that by making sure that $p \equiv 7 \pmod{8}$.
On the other hand, it is also a comparatively costly option, as looking for a value $p$ that meets both conditions means going through a lot of candidates. Now, if you're doing this computation only rarely (say, once a day), that's really not that big of a deal; however if you're coining a fresh group for every exchange, it is certainly more expensive that you need.
An alternative approach is:
Search for a 256 bit prime $q$
Once you have that, scan through 2048 bit values $kq+1$ for a prime; when you find it, call it $p$
For $g$, select an arbitrary value $x$ (2 works), and compute $x^k \bmod p$; if that value is not 1, use it for $g$.
The order of the generator $g$ will be $q$, which is a sufficiently large prime that we don't need to worry about attacks that take $O(\sqrt{q})$ time.
The expensive operation is the search for $p$, which is no more expensive than any other prime search for that size.