Is there some address list or rules for forbid users to connect via teamviewer?
i found some, but somehow it goes throguh.
Not terribly, as these L7 rules would likely be used on DNS queries (which requires to redirect any DNS request from the client to your own DNS, which the client can beat using some counter-measure like secure DNS so you end where you began) and DNS queries are not there all the time and the relatively simple regexp matches on the very first (and only) packet.Not sure if that still applies or how CPU intensive it may be???
Well, the key is to identify that traffic; what you use that identification for is less important. Sure, to log it, it is best not to restrict it, because then you can just log outgoing connections to TCP and/or UDP port 5938 and 99.9% of them are teamviewer ones. Once you block the port 5938, the application will revert to 443 or 80, which you can only block for particular IP addresses if you can't block web access completely.If it is against company policy then you don't want to block it - you want to log it, present it to HR and discipline the culprit.
Code: Select all
/ip dns static
add address=10.1.2.3 comment="Block TeamViewer" regexp=".*\\.teamviewer\\.com\$" ttl=1h
add address=10.1.2.3 comment="Block TeamViewer" name=teamviewer.com ttl=1h
/ip route
# This is the unreachable IP address that is used for blocking
# Feel free to use any private IP address that is NOT part of your network: https://en.wikipedia.org/wiki/Private_network#Private_IPv4_addresses
add distance=1 dst-address=10.1.2.3/32 type=unreachable
/ip firewall filter
# These rules MUST BE BEFORE ALLOW RULES - they prevent simple change in Windows settings to use different DNS servers (any internal DNS/Active Directory servers, or anything else that does independent DNS resolution must be excluded from these rules!)
add chain=forward protocol=udp dst-port=53 action=drop
add chain=forward protocol=tcp dst-port=53 action=drop
Code: Select all
/ip firewall filter
add chain=forward dst-address=10.1.2.3 protocol=tcp action=reject reject-with=tcp-reset log=yes log-prefix="TeamViewer"
add chain=forward dst-address=10.1.2.3 action=reject log=yes log-prefix="TeamViewer"