Dear All,
I want to manage my time more efficiently so I want to create simple rule to block specyfic domain, netflix.com for example.
After that I want to create a schedule to disable rule in selected time range.
In the first place I tried to create a rule at least and I did this in two different ways.
Best regards
I want to manage my time more efficiently so I want to create simple rule to block specyfic domain, netflix.com for example.
After that I want to create a schedule to disable rule in selected time range.
In the first place I tried to create a rule at least and I did this in two different ways.
- Added a rule manually. Steps:
- Create and add rule
Code:iptables -I FORWARD -p tcp -m webstr --url netflix.com -j REJECT --reject-with tcp-reset iptables -I FORWARD -i br0 -p udp -m udp --dport 53 -m string --string "netflix.com" --algo bm --to 65535 --icase -j DROP iptables -I INPUT -i br0 -p udp -m udp --dport 53 -m string --string "netflix.com" --algo bm --to 65535 --icase -j DROP
- Check access - netflix is still avalible
- Create and add rule
- Added a rule via GUI (Firewall - URL Filter) and export iptables config.
- Export iptables config before adding any rule (to have clear config)
Code:ipconfig-save > open_url.txt
- Added rule
- Checked access - netflix is blocked
- Export iptables config (to have config with blocked url)
Code:iptables-save > blocked_url.txt
- Import open_url.txt
INI:iptables-restore < open_url.txt
- Check access - netflix is open
- Import blocked_url.txt
Code:iptables-restore < blocked_url.txt
- Export iptables config before adding any rule (to have clear config)
Best regards
Last edited: