The short answer:
There is no formula or plan, or set of tactics you can use to resist porn, or to resist temptation 100%. It could very well be a lifetime struggle. You are best served by seeking accountability, by distracting yourself from the flesh with thoughts of the Spirit, and by weaning yourself off of lust's addictive hold. The longer you can last without it, the weaker its hold upon you.
Our longer answer will be broken down into certain parts.
One: Scriptural references to the subject, and the lessons and analogies we can take away from that Scripture.
Two: The words of those experienced in this issue.
Long Answer (Part One)
Long Answer (Part Two)
If you'd like to explore the means of "brotherly accountability" to defeat a porn addiction, there's a program called X3 Watch. This program monitors all of your devices and sends an 'accountability partner' of your choice an alert if you start surfing towards the wrong sorts of sites. I believe this used to be free, but it now costs about $25 a year for this service.
There a other services which also cost some money.
These programs are a sound idea at a basic level, but they don't really address things properly. You should be honest and open with whomever you choose for accountability, you shouldn't need a software package to 'tattle on you'. Also, almost all of these services and programs can be circumvented if you want to badly enough, so you defeat their very purpose, and still haven't addressed the underlying sin issues.
Accountability software doesn't really help as long as one's heart doesn't change. All it does is give them a way to 'cover' what they are really doing with a person who is supposed to be helping them defeat the addiction.
Let me be very clear: It's almost impossible to defeat an addiction for someone else's reasons. You can really only defeat an addiction for your own reasons. Ask Christ for help, He will NOT forsake you.