It seems that you may be having erythema Nodosum
. The lesions are erythematous,nodular,painful and mostly occur on legs. They may be idiopathic ...i.e. without any cause or there may be some cause. It may be infection any where in body,connective tissue
,drugs..etc. You consult competent dermatologist
. After few investigations and after finding out some cause, he may give proper treatment to cure the cause. And along with it, he may give steroids in proper dose and tappering dose with antibiotics. You may be improved. I hope you got my answer.
Dr. Ilyas Patel MD