An ex-soldier posted nude photos of his former girlfriend online in a bizarre attempt to win her back.

The fake dating profiles, created by Joel Landon Greentree, 23, led to five men showing up at his ex-girlfriend's house looking for sex.

The Springfield Lakes man appeared at the Ipswich Magistrates Court, Greentree for charges relating to incidents between August 2016 and March 2017, The Courier Mail reported.

Joel Landon Greentree (pictured) appeared in Ipswich Magistrates Court, Greentree

He was severely depressed and drinking heavily when he posted the naked images of his ex-partner online, a psychological report submitted in court said.

He had lost his job in the Army after suffering an injured that required surgery.

His lawyer Matthew Fairclough said it was a 'hopeless attempt to win her back'.

'He was only 21 at the time. He made a clearly catastrophic misjudgement.'

Magistrate David Shepherd said Greentree's behaviour had potential to haunt the woman for a long time.

'This conduct brought significant trauma to the victim.'

He said there was 'potential for real disaster' having uninvited men show up at her home.

He pleaded guilty to using a phone service to menace/harass, unlawful stalking a woman and two counts of contravening a domestic violence protection order that was put in place in Darwin.

He was sentenced to 18 months' probation and six months jail with immediate parole release.