I have L7 filter rule that blocks Youtube. It's hard to block it via IP filter because Google uses multiple addresses and this affects the use of other sites, like Gmail or Google Seach. The problem is that my filter rule is REGEXP. I apply it for all IPs that are not part of the Allowed users IP-s.
This works just fine. But when I try to make exception for Youtube only, without allowing users to open other blocked sites - I can get it to work.
My rule for allowed users is
!Allowed users
L7 filter rule
I tried putting rule before it,
IP address
!L7 filter rule
I tried it also this way
!IP address
L7 filter rule.
Nothing seems to be working and I cant add L7 filter rule exception for a certain IP that is not a part of Allowed Users IP-s.
I can use the same as forwarding TCP from the SourceIP to the Destination IP of the site, but because Google uses multiple servers and IP-s this wont work.
I can use static DNS entries, but because I also run a DC controller, when I do something like this and DC caches that certain dns record leads to 127.0.0.0,
this will interfere with the connectivity of any computers, even the ones that are allowed to open it. If I make an exception for the DC, on the other hand
- this bypasses the DNS static entries completely.
I cant block youtube using a proxy, because it will screw up any HTTPS sites and will give Certificate warnings.
My Mikrotik is from the newer ones, pretty solid hardware, so I don't think that some L7 rules will have adverse effect on it's performance.
I also heard that I can block sites using TLS host, but because of already established session it will not take effect immediately.
So, I decided that it will be L7 rule. Good, but I cant add exception for specific private IP-s.
Also, I have filter list in Lists. Sometimes the Mikrotik has hard time updating the IP-s. What script do I need for it to update the list several times a day?
Because for example I block access to certain site, but after some time(if it uses multiple IP-s) they are able to open it.
The same is when I allow access by using a rule to forward the traffic by it bypassing the rule. If the site changes IP, they are unable to open it,
until I open the rule, enter the DNS name of the site again, it gets the new IP and then everything is fine.