firewall restrictions do not work

If your problem doesn't fall into one of the other categories, report it here.

Moderator: Moderators

Post Reply
sirazhudin@gmail.com
Posts: 4
Joined: Mon Sep 22, 2014 1:26 pm

firewall restrictions do not work

Post by sirazhudin@gmail.com »

Hi, I have dir-825B1 with 1.6.2.
I created a restriction rule to block facebook but it does not work.
I looked at my other router with TomatoUSB and used iptables rules from there and it worked.
iptables -N restrict
iptables -N rres01
iptables -N rstr01
iptables -A rstr01 -p tcp -m string --string "facebook.com" --algo bm --from 1 --to 600 -j REJECT --reject-with tcp-reset
iptables -A rstr01 -p udp -m string --string "facebook.com" --algo bm --from 1 --to 600 -j REJECT
iptables -A rres01 -p tcp -m multiport --dports 53,80,443 -j rstr01
iptables -A rres01 -p udp --dport 53 -j rstr01
iptables -A restrict rres01


iptables -I FORWARD 2 -o eth1 -j restrict

Please advise,
Serge

matonman
Posts: 4
Joined: Sat Oct 05, 2013 10:25 pm

Re: firewall restrictions do not work

Post by matonman »

Likewise I have issues. I added a rule to block one IP address and it took down my work computers connection which has a completely different address.

Not very useful at the moment sadly and not much forthcoming about it.

homolka
Posts: 14
Joined: Wed Aug 08, 2012 1:55 pm

Re: firewall restrictions do not work

Post by homolka »

Hi,
Connect to the router using WinSCP and write to the file hosts

# Block Facebook
127.0.0.1 www.facebook.com
127.0.0.1 facebook.com
127.0.0.1 static.ak.fbcdn.net
127.0.0.1 www.static.ak.fbcdn.net
127.0.0.1 login.facebook.com
127.0.0.1 www.login.facebook.com
127.0.0.1 fbcdn.net
127.0.0.1 www.fbcdn.net
127.0.0.1 fbcdn.com
127.0.0.1 www.fbcdn.com
127.0.0.1 static.ak.connect.facebook.com
127.0.0.1 www.static.ak.connect.facebook.com
127.0.0.1 cs-cz.facebook.com
127.0.0.1 en-gb.facebook.com

Post Reply