I have:
Mikrotik RB750GL, os v 5.25
Subdomain: some.example.com (A record to 1.1.1.1)
External IP: 1.1.1.1
Internal IP: 2.2.2.2 with web-server on 80 port
I want if client go to address http://some.example.com, mikrotik see http-header with l7-filter regexp on 1.1.1.1 in mangle and mark it. Then in nat i am dnat this marked connection to 2.2.2.2.
Trouble is - packets don’t want marking. Packet counter is 0. Maybe because i write wrong regexp. Help me please who can.
/ip firewall nat
chain=dstnat action=dst-nat to-addresses=2.2.2.2 to-ports=80 protocol=tcp dst-address=1.1.1.1 dst-port=80 connection-mark=some.example.com-forward
/ip firewall mangle
chain=prerouting action=mark-connection new-connection-mark=some.example.com-forward passthrough=no dst-address=1.1.1.1 layer7-protocol=dvr-http
/ip firewall layer7-protocol
# NAME REGEXP
0 dvr-http ^\S+ \S+ HTTP\/\d\.\d.+Host\:([^\n\.]+\.)*some\.example\.com.*\n\n