Если у тебя физический порт свободен — отлично. Назовём его ether3:
/interface bridge add name=bridge-dmz
/interface bridge port add bridge=bridge-dmz interface=ether3
/ip address add address=192.168.100.1/24 interface=bridge-dmz
/ip pool add name=dmz-pool ranges=192.168.100.10-192.168.100.50
/ip dhcp-server add address-pool=dmz-pool interface=bridge-dmz name=dhcp-dmz
/ip dhcp-server network add address=192.168.100.0/24 gateway=192.168.100.1
Для базовой DMZ:
Добавь firewall правила:
/ip firewall filter
add chain=forward action=accept in-interface=bridge-dmz out-interface=ether1 comment="DMZ to Internet"
add chain=forward action=drop src-address=192.168.100.0/24 dst-address=192.168.88.0/24 comment="Block DMZ to LAN"
add chain=forward action=drop src-address=192.168.88.0/24 dst-address=192.168.100.0/24 comment="Block LAN to DMZ"
Для веб-сервера (например, порт 80 и 443):
/ip firewall nat
add chain=dstnat dst-port=80 action=dst-nat to-addresses=<ip-server> to-ports=80 protocol=tcp
add chain=dstnat dst-port=443 action=dst-nat to-addresses=<ip-server> to-ports=443 protocol=tcp
Добавляем srcnat правило, чтобы MikroTik переписал исходный IP клиента внутри LAN на ip-server, чтобы ответ вернулся корректно:
/ip firewall nat
add chain=srcnat src-address=192.168.88.0/24 dst-address=<ip-server> out-interface=bridge-dmz action=masquerade comment="Hairpin NAT for DMZ access from LAN"
Когда ты из LAN заходишь на https://yourdomain.com (указывающий на X.X.X.X):
dst-nat → внутрь DMZ