Stone walls do not a prison make,
Nor iron bars a cage.

Richard Lovelace (1617-1657) English poet
“To Althea, from Prison,” l. 25 (1649)
    (Source)