/ip firewall layer7-protocol add name=remotes regexp="^.*(anydesk.com).*\$"
/ip firewall mangle
add action=mark-connection chain=prerouting connection-mark=no-mark dst-port=53 layer7-protocol=remotes new-connection-mark=remotes-conn passthrough=yes protocol=udp
add action=mark-packet chain=prerouting connection-mark=remotes-conn new-packet-mark=remotes-packet
/ip firewall filter
add action=reject chain=input packet-mark=remotes-packet reject-with=icmp-host-unreachable place-before=0
add action=reject chain=forward packet-mark=remotes-packet reject-with=icmp-host-unreachable place-before=0
/ip firewall address-list add address=<IP роутера> list=allowed-dns
/ip firewall mangle
add action=mark-connection chain=prerouting connection-mark=no-mark dst-address-list=!allowed-dns dst-port=53 new-connection-mark=dns-conn passthrough=yes protocol=udp src-address-list=!allowed-dns
add action=mark-connection chain=prerouting connection-mark=no-mark dst-address-list=!allowed-dns dst-port=53 new-connection-mark=dns-conn passthrough=yes protocol=tcp src-address-list=!allowed-dns
add action=mark-packet chain=prerouting connection-mark=dns-conn new-packet-mark=dns-packet
/ip firewall filter
add action=reject chain=input comment="drop other dns" packet-mark=dns-packet reject-with=icmp-host-unreachable place-before=0
add action=reject chain=forward comment="drop other dns" packet-mark=dns-packet reject-with=icmp-host-unreachable place-before=0
add action=mark-connection chain=prerouting connection-mark=no-mark dst-address-list=<СПИСОК ЗАПРЕЩЕННЫХ IP> new-connection-mark=remotes-conn passthrough=yes
/ip f la ex
upstream web1 {
server 127.0.0.1:80;
}
upstream web2 {
server 192.168.88.30:80;
}
server {
server_name firstserver8820.ru;
listen *:80;
listen *:443 ssl http2;
# тут нужно настроить все что связано с ssl: ssl_certificate, ssl_certificate_key, ssl_trusted_certificate итд итп
location / {
proxy_pass http://web1;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Real-IP $remote_addr;
}
}
server {
server_name secondserver8830.ru;
listen *:80;
listen *:443 ssl http2;
# тут нужно настроить все что связано с ssl: ssl_certificate, ssl_certificate_key, ssl_trusted_certificate итд итп
location / {
proxy_pass http://web2;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Real-IP $remote_addr;
}
}