  We are able to perform the duality transformation of the spin system which
was found before as a lattice realization of the string with linear action. In
four and higher dimensions this spin system can be described in terms of a
two-plaquette gauge Hamiltonian. The duality transformation is constructed in
geometrical and algebraic language. The dual Hamiltonian represents a new type
of spin system with local gauge invariance. At each vertex $\xi$ there are
$d(d-1)/2$ Ising spins $\Lambda_{\mu,\nu}= \Lambda_{\nu,\mu}$, $\mu \neq \nu =
1,..,d$ and one Ising spin $\Gamma$ on every link $(\xi,\xi +e_{\mu})$. For the
frozen spin $\Gamma \equiv 1$ the dual Hamiltonian factorizes into $d(d-1)/2$
two-dimensional Ising ferromagnets and into antiferromagnets in the case
$\Gamma \equiv -1$. For fluctuating $\Gamma$ it is a sort of spin glass system
with local gauge invariance. The generalization to $p$-branes is given.
