OpenWrt Forum Archive

Topic: Redirecting urls via etc/hosts?

The content of this topic has been archived on 24 Jan 2018. There are no obvious gaps in this topic, but there may still be some posts missing at the end.

I was looking for a simple solution to redirect a few sites that my son likes to visit instead of doing his homework.  I was hoping that I'd be able to just insert a few entries into /etc/hosts to accomplish this, but this isn't having any effect.

My etc/hosts file currently looks like this:

127.0.0.1 localhost OpenWrt
192.168.1.9 fanfiction.net

No DNS entry is set on the client side, so all DNS requests should be handled by OpenWRT.  I'm assuming I'm missing something basic here, but I haven't done anything like this before, so I'm stumped for now.

Solved my own issue (always the best way to learn!), looks like it was a ID 10 T error...  smile

I had assumed (always bad) that the domain would also have included  the www.* url as well, but that wasn't the case.  Manually adding www.fanfiction.net (using my example above) seems to have done the trick.

The discussion might have continued from here.