Meaning : In a manner acceptable to common custom.
Example :
You cannot do this legitimately!.
Synonyms : legitimately, licitly
In a manner disapproved or not allowed by custom.
He acted illegitimately when he increased the rent fourfold.Meaning : By law. Conforming to the law.
Example :
We are lawfully wedded now.