It sounds like he may have an anal gland that has become infected and abscessed through the skin near the anus.
Antibiotic ointment and cleaning with peroxide is fine but you will want to see your vet for possible anal gland cleaning and packing with antibiotics or an oral antibiotic.
You can read about anal glands here
http://www.marvistavet.com/html/body_anal_sacs.html
Sometimes adding more fiber to a dog's diet helps prevent the glands from becoming overly full - you can ask your vet about that.
Hope this helps you!
Please press Accept if you find my answer helpful. Want more info? Just reply on your question!
Bonuses for good work are always appreciated!
Thanks for the opportunity to help you!