Scobie
New Around Here
I just got a new Asus router and I installed Merlin and Diversion and so far it's looking amazing, big props to the developers.
Anyway, stock Asus only has firewall blocking for every device, and parental controls blocks too many sites.
How do I block URLs for certain MAC addresses? In practice I wanna URL block youtube and twitch on my phone.
- EDIT - SOLUTION:
Log in to your router via SSH and type the following commands,
replacing youtube with the site you wanna block, de:ad:de:ad:de:ad with your MAC address and possibly 192.168.1.1 if your router uses a different IP.
Only tcp blocking (the first command) works for some sites, but other sites like youtube uses udp as a backup if tcp doesn't work.
Anyway, stock Asus only has firewall blocking for every device, and parental controls blocks too many sites.
How do I block URLs for certain MAC addresses? In practice I wanna URL block youtube and twitch on my phone.
- EDIT - SOLUTION:
Log in to your router via SSH and type the following commands,
replacing youtube with the site you wanna block, de:ad:de:ad:de:ad with your MAC address and possibly 192.168.1.1 if your router uses a different IP.
Code:
iptables -I FORWARD -p tcp -m mac --mac-source de:ad:de:ad:de:ad -m webstr --url youtube -j REJECT --reject-with tcp-reset
iptables -I FORWARD -i br0 -p udp -m mac --mac-source de:ad:de:ad:de:ad -m udp --dport 53 -m string --string "youtube" --algo bm --to 65535 --icase -j DROP
iptables -I INPUT -d 192.168.1.1/32 -i br0 -p udp -m mac --mac-source de:ad:de:ad:de:ad -m udp --dport 53 -m string --string "youtube" --algo bm --to 65535 --icase -j DROP
Last edited: