LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (https://www.linuxquestions.org/questions/linux-networking-3/)
-   -   Linksys WRT54G Access Restrictions (https://www.linuxquestions.org/questions/linux-networking-3/linksys-wrt54g-access-restrictions-442650/)

pljvaldez 05-07-2006 11:03 PM

Linksys WRT54G Access Restrictions
 
I've got a WRT54G wireless router (v1.1 w/ Sveasoft Alchemy Firmware) at home. I don't have an internet proxy setup, but yesterday my wife asked me to block a single site that she can't seem to keep herself from visiting (myspace.com).

Anyway, there's an admin page on the Sveasoft firmware that supposedly lets you do some filtering by website name and apply that filter by IP address or MAC address. I gave it a whirl and put all the settings in and it seemed to take okay, but the site is not being blocked...

Anyone have any success using the built in access restrictions? Or does anyone know where/what such a restriction would look like on the router (I can ssh in)?

Anyway, just looking for some guidance before I just go ahead and make a squid proxy, which seemed like a lot of effort for just blocking one site...

jschiwal 05-08-2006 12:31 AM

There is a quick and dirty method that works whether you are using windows or linux.
Add "127.0.0.1 www.myspace.com" to her '/etc/hosts' and/or 'c:\windows\system32\drivers\etc\hosts' file.

Then www.myspace.com will resolve to localhost. Of course if she knows about this she could reverse it herself, but it may be enough to resist the temptation.

If she is using linux, you can also set up the firewall to block that address.

Bruce Hill 05-08-2006 01:09 AM

First, what IP address is www.myspace.com?

Code:

mingdao@silas:~$ host www.myspace.com
www.myspace.com has address 63.208.226.40
www.myspace.com has address 63.208.226.41
www.myspace.com has address 63.208.226.42
www.myspace.com has address 63.208.226.43

I got a WRT54G and went into the web interface, then chose Access Restrictions and put those
four IP addresses into "Website Blocking by URL Address" and now I can't get there.

NB: I did have to shutdown and restart Firefox before it worked.

pljvaldez 05-08-2006 11:39 AM

Thanks guys, I'll try it out when I get home tonight...

pljvaldez 05-09-2006 10:42 PM

Thanks. I messed up the firewall ruleset created with fwbuilder to begin with (had a rule that denied anything originating from myspace.com but a conflicting rule that allowed anything originating in my network to be allowed), but once I blocked outgoing requests from my network to myspace.com, it worked like a champ. I appreciate all your help.

Also, thanks for the hosts file tip, I may be able to use that at my parents house (they have dialup and windows firewall only) to help blacklist sites from my little brother. I did some googling to find some lists and just need to disable DNS caching in XP before copying the file to the hosts file.

Thanks again!

archtoad6 06-21-2006 08:47 AM

What DNS server is your router using?

If by any chance it's dnsmasq rather than Bind/named, then you can do a hosts-like block if the config file. The big difference is you get wildcarding.

If, say, vonna.com has 256 servers:
ad.vonna.com, ad1.vonna.com, ... , ad255vonna.com, then blocking requires 256 individual lines in a hosts file, but only one in a dnsmasq config file.

br0k2e 11-13-2006 02:56 AM

Linksys wrt54g ( alchemy )
 
Hey i was looking up the same thing... saw this post and i figured id tell you what worked for me.

Website Blocking
by URL Address


.myspace.com <--- in box 1
*.myspace.com <--- in box 2

hope it works for ya

br0k2e 11-13-2006 03:02 AM

by the way
 
.. by the way make sure that you have edited your pc list.
"Edit List of PCs" button. click that and make sure to enter in an IP range i.e. 192.168.1.100~200

again good luck


All times are GMT -5. The time now is 04:27 PM.