CHICAGO (STMW) — Alleged pedophile and former state Rep. Keith Farnham has been banned from his own patio by a federal judge.

U.S. Magistrate Judge Jeffrey Gilbert said the measure was necessary to protect the public because the patio at Farnham’s condo is shared with a family that has a 7-year-old boy.

READ MORE: Chicago Weather Alert: Lake-Effect Snow On The Way With 4 To 8 Inches Possible; Winter Storm Warning Issued

The Elgin Democrat, 66, has been under house arrest since the feds last week alleged that he traded child pornography online and crowed “12 is about as old as I can handle, I love 6 7 8” in a web chat.

On Wednesday, Farnham’s attorney, Terry Ekl, complained that an electronic monitoring ankle bracelet that authorities are using to ensure Farnham does not leave home had been tripped when Farnham went outside to his patio.

But Gilbert noted that a young boy also has access to the patio, which he said was “an unsecured area” that Farnham must stay out of.

“I’m not comfortable who goes in there,” the judge said.

READ MORE: Two Men Shot Dead In Car In Ravenswood; Car Goes On To Crash And Catch Fire

Gilbert said Farnham can “pull down the blinds” or “open the door or window” if he wants fresh air or sunlight.

Farnham’s wife, Susan, signed papers promising to turn Farnham in if he breaks any of the rules of his house arrest.

The judge also ordered her to keep any computers and iPads password-protected and in a locked filing cabinet to ensure Farnham does not have access to the Internet.

Farnham, who resigned shortly after his office was raided in March, again carried a portable oxygen tank in court Wednesday.

Ekl said previously that his client had a bout with bladder cancer and is in need of a lung transplant.

MORE NEWS: Bears Hire Colts Defensive Coordinator Matt Eberflus As New Head Coach

(Source: Sun-Times Media Wire © Chicago Sun-Times 2014. All Rights Reserved. This material may not be published, broadcast, rewritten, or redistributed.)