if you block IP Adresses, you will block other Webpages hosted on the same IP too.
Here is a Tutorial to edit your hostfile:
Please remember running notepad as administrator.
For blocking a website write an Entry like this:
You can try to configure your Router using the Open DNS Servers and use it with an account. So you can block all porn related requests. But the Setup is a little bit tricky. You have to enter the opendns DNS Servers and you have to link your external IP Address to your Account. They offer a tool for this.
If you use the hosts File Setup, make sure that the user your roommate uses don't have Administrator Permissions. Then he can't change it. Unfortunately you have to enter every porn site by your own.
If you have the skills to, i would prefer the opendns Setup.
More informations can be found here: