Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game. |
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
|
05-07-2006, 11:03 PM
|
#1
|
LQ Guru
Registered: Dec 2005
Location: Somewhere on the String
Distribution: Debian Wheezy (x86)
Posts: 6,094
|
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...
|
|
|
05-08-2006, 12:31 AM
|
#2
|
LQ Guru
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733
|
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.
Last edited by jschiwal; 05-08-2006 at 12:32 AM.
|
|
|
05-08-2006, 01:09 AM
|
#3
|
HCL Maintainer
Registered: Jun 2003
Location: McCalla, AL, USA
Distribution: Arch, Gentoo
Posts: 6,941
Rep:
|
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.
|
|
|
05-08-2006, 11:39 AM
|
#4
|
LQ Guru
Registered: Dec 2005
Location: Somewhere on the String
Distribution: Debian Wheezy (x86)
Posts: 6,094
Original Poster
|
Thanks guys, I'll try it out when I get home tonight...
|
|
|
05-09-2006, 10:42 PM
|
#5
|
LQ Guru
Registered: Dec 2005
Location: Somewhere on the String
Distribution: Debian Wheezy (x86)
Posts: 6,094
Original Poster
|
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!
Last edited by pljvaldez; 05-09-2006 at 10:44 PM.
|
|
|
06-21-2006, 08:47 AM
|
#6
|
Senior Member
Registered: Oct 2004
Location: Houston, TX (usa)
Distribution: MEPIS, Debian, Knoppix,
Posts: 4,727
|
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.
|
|
|
11-13-2006, 02:56 AM
|
#7
|
LQ Newbie
Registered: Nov 2006
Posts: 2
Rep:
|
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
|
|
|
11-13-2006, 03:02 AM
|
#8
|
LQ Newbie
Registered: Nov 2006
Posts: 2
Rep:
|
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 09:24 AM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|