Blog commenting gives traffic to your website at the same Time do –follow blogs gives a backlink to your website. But your comment is related the article otherwise moderator will not approve your comment and treated as spam.
Forum participating is solving the doubts and problems. You have to start a new thread in the related category the forum members answering to your questions. After you reach the maximum number of posts, you have to create the forum signature it gives the backlink to your website and improves the SERP for particular keyword. But do not spam in a forum.