This paper presents the design of a nanomagnet-based Ising machine where the stochasticity of low barrier magnetic tunneling junctions (MTJ) and their programmable dipole interaction is exploited to map quadratic unconstrained binary optimization (QUBO) problems on a nanomagnet network. A programmable dipolar interaction of neighboring magnets is achieved using a straintronic adaptation of MTJ, where the interaction of nanomagnets can be controlled using strain effects in addition to their dipolar coupling, which tends to anti-correlate the neighboring magnets. Straintronic MTJs are placed on a piezoelectric layer, and the applied voltage on the layer induces stress-based coupling of neighboring magnets which counters the dipolar interaction of neighboring magnets. By controlling the voltage magnitude, the dipolar interaction of neighboring magnets can be programmably countered. Since our scheme only facilitates magnet interaction on a one-dimensional chain, we also discuss a mapping strategy to implement higher-order Ising interactions (such as on a two-dimensional lattice) on one-dimensional chains of straintronic nanomagnets by iteratively solving the problems. We also present simulation results on image denoising using the proposed design. Despite lower-order interaction among magnets, high-order Ising problems can be solved using the proposed iterative approach. Since straintronic magnets incur switching energy ~fJ, even larger scale combinatorial optimization problems can be solved energy efficiently.