Our valued sponsor

Can I setup a legit structure when having backen company to be offshore?

It depends a lot on where you live and what laws are applicable. Most likely you cannot avoid tax completely (at least not if you want to take out some form of income), but you may be able to minimize tax. You need to check this with a lawyer or qualified accountant.
 
I agree with Zqq, consult a local tax firm and maybe even a legal adviser who specialized in International tax laws.
 
It isn't illegal when a offshore company holds the shares in an onshore company as I remember.