Access restriction for "https"

Post new topic   Reply to topic    DD-WRT Forum Index -> General Questions
Author Message
LBear
DD-WRT Novice


Joined: 15 Sep 2010
Posts: 3

PostPosted: Wed Sep 15, 2010 18:56    Post subject: Access restriction for "https" Reply with quote
I need to restrict access to some websites, when I configure these sites in "Access restriction", it works, but works only for HTTP. How can I restrict access for both protocols, HTTP and HTTPS?
Sponsor
feliciano
DD-WRT Guru


Joined: 24 Oct 2008
Posts: 1096
Location: Latin America

PostPosted: Thu Sep 16, 2010 4:34    Post subject: Reply with quote
http = tcp port 80
https = tcp port 443
GeeTek
DD-WRT Guru


Joined: 06 Jun 2006
Posts: 3757
Location: I'm the one on the plate.

PostPosted: Thu Sep 16, 2010 5:09    Post subject: Reply with quote
feliciano wrote:
https = tcp port 443

...and/or tcp port 8080

Still, access restrictions apply to the URL name, not the protocol or port #. Mebbe the https encryption is thwarting detection by the DD-wrt restiction rules. I'm gonna have to do some testing. Good heads up !
LBear
DD-WRT Novice


Joined: 15 Sep 2010
Posts: 3

PostPosted: Thu Sep 16, 2010 15:23    Post subject: Reply with quote
Actually, web site I have problem with is www.meebo.com, when it is entered in restricted URLs http://www.meebo.com is blocked but https://www.meebo.com works fine.

Any idea how can I block www.meebo.com completely?
gobbledigook
DD-WRT Guru


Joined: 06 Apr 2009
Posts: 727

PostPosted: Thu Sep 16, 2010 15:30    Post subject: Reply with quote
am i stating the obvious?

just add both to access restrictions Smile
LBear
DD-WRT Novice


Joined: 15 Sep 2010
Posts: 3

PostPosted: Thu Sep 16, 2010 16:06    Post subject: Reply with quote
gobbledigook wrote:
just add both to access restrictions Smile


Tried, even if I add https://www.meebo.com to URL restrictions it's still accessible
GeeTek
DD-WRT Guru


Joined: 06 Jun 2006
Posts: 3757
Location: I'm the one on the plate.

PostPosted: Thu Sep 16, 2010 18:25    Post subject: Reply with quote
I know IP tables firewall rules can drop packets based on the IP address but I don't know if it can be used to drop packets to a URL. If so then it would solve the problem.
dude04
DD-WRT Novice


Joined: 19 Sep 2010
Posts: 2

PostPosted: Sun Sep 19, 2010 19:00    Post subject: Reply with quote
I have been looking into this as well. I believe that "Access Restrictions" does not support https blocking.

That being said it does not mean there isn't a way to do it.

To block both hhtp and https traffic to the specific website do not use "Access Restrictions" but use the iptables command to insert ACL into your router to block the access to the specific website.

1. Login to your Router via webage
2. Navigate to the Administration -> Command Tab
3. Insert the following command:
iptables -I FORWARD -p tcp -d meebo.com -m multiport --dports 80,443 -j REJECT

Basically this command states to block both http and https traffic to the specific website. insted of meebo.com enter the IP address of meebo.com (208.81.191.110)

so the command is:
iptables -I FORWARD -p tcp -d 208.81.191.110 -m multiport --dports 80,443 -j REJECT

4. Click on Run Command
5. Save Firewall.
6. Log off.

You should not be able to access meebo.com any more

Good Luck.
thedak
DD-WRT Novice


Joined: 02 Nov 2010
Posts: 40

PostPosted: Tue Nov 02, 2010 21:02    Post subject: Reply with quote
dude04 wrote:
I have been looking into this as well. I believe that "Access Restrictions" does not support https blocking.

That being said it does not mean there isn't a way to do it.

To block both hhtp and https traffic to the specific website do not use "Access Restrictions" but use the iptables command to insert ACL into your router to block the access to the specific website.

1. Login to your Router via webage
2. Navigate to the Administration -> Command Tab
3. Insert the following command:
iptables -I FORWARD -p tcp -d meebo.com -m multiport --dports 80,443 -j REJECT

Basically this command states to block both http and https traffic to the specific website. insted of meebo.com enter the IP address of meebo.com (208.81.191.110)

so the command is:
iptables -I FORWARD -p tcp -d 208.81.191.110 -m multiport --dports 80,443 -j REJECT

4. Click on Run Command
5. Save Firewall.
6. Log off.

You should not be able to access meebo.com any more

Good Luck.


Interesting you note this. I have been having exactly the same problem on my e3000 with Build 15453. Tried blocking FB, but https:// gets around the block, either as a URL or a keyword restriction. The iptables idea is a good one, but some sites map to multiple IP addresses, so a single IP address block only works some of the time. I ended up going into the DNSMasq options in Services and entering:

address=/.facebook.com/127.0.0.1
address=/facebook.com/127.0.0.1

or some other address that won't map to anything useful. In fact you can do a redirect using this method to another site of your choice.

That said, shouldn't someone be looking at the Access Restrictions applying to all URLs/Keywords regardless of the SSL state?
AMDphreak
DD-WRT Novice


Joined: 28 Aug 2011
Posts: 10

PostPosted: Sun Aug 28, 2011 5:43    Post subject: Reply with quote
I have the same problem. I was hoping we could get a fix made and publish it. I don't really have that Linux spirit of spending hours on end trying to work around a broken piece of software. I like the traditional UNIX method: fix it in the code.

So we all seem to agree that the default behavior should be to block all ports for a given domain. Also, if the backend software doesn't already do this, I believe we all agree that the filter should work on a domain level. If there is a single connection going to the facebook.com or meebo.com domain, then it should be blocked, no matter what port it uses or what protocol it uses.

Alternatively, a more granular approach would allow you to put in a specified protocol or port number to restrict all access on a specific port or protocol. It would basically give you the level of control that a regular URL gives you.

Who knows how to fix this? I want to help release a minor update to get this fixed.

Thanks.
sakay
DD-WRT Novice


Joined: 23 Aug 2011
Posts: 2

PostPosted: Mon Aug 29, 2011 13:43    Post subject: Reply with quote
Hey friends,

i have very good suggestion for you .you just put in Google freeware restriction url software than you see what happened this is very usefull.

_________________
Crown Moulding
MDF HDF Wood Plaster Crown Moulding


Last edited by sakay on Sun Sep 04, 2011 23:17; edited 1 time in total
AMDphreak
DD-WRT Novice


Joined: 28 Aug 2011
Posts: 10

PostPosted: Tue Aug 30, 2011 2:17    Post subject: We don't do that here Reply with quote
sakay wrote:
Hey friends,

i have very good suggestion for you .you just put in Google freeware restriction url software than you see what happened this is very usefull.


There are quite a few things wrong with your suggestion. If you are trying to help, then just consider this a learning situation. If you were trying to be rude, then consider this a condemnation.

Freeware is junk. Why? It only works on a single user's computer, for a single platform, and users can easily overcome this software with a little thing called Windows Task Manager, where they can kill the application (I'm making an educated guess that this software only runs on Windows).

DD-WRT is built on Free and Open Source Software (FOSS), which is software that respects the users' rights to modify, improve, and redistribute improvements to the software (optionally with the assurance that no company will steal the software and use it to make billions on your hard work). Freeware, on the other hand, is like a whore. It comes when you're feeling desperate, and then it leaves in the morning. You don't get to improve its life-style or educate it. It's dead weight.

Also, the desired solution (the topic of this thread) is to be implemented on the router device, so that a network administrator can adjust restrictions without interfering with the target's use of their personal computer. Another IT consideration is that router modifications are transparent to the end users, don't require costly interruptions in work, etc.

It's all around a bad deal.
lmckenzi
DD-WRT Novice


Joined: 05 Dec 2013
Posts: 1

PostPosted: Thu Dec 05, 2013 22:06    Post subject: Additional guidance Reply with quote
There's some additional discussion here:
http://www.dslreports.com/forum/r25877744-Access-Restriction-for-DD-wrt

It adds instructions on how to use cron together with iptables to better emulate what Access Restrictions does (and what it likely does under the covers). Though why it can't just be the default behavior for Access Restrictions, I'm not sure.
Display posts from previous:    Page 1 of 1
Post new topic   Reply to topic    DD-WRT Forum Index -> General Questions All times are GMT

Navigation

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum