Hello, I am having trouble with hairpin.
Not even close to being a networking engineer, I only partly understand what I’m doing, which is a bit dangerous when it is about firewalling. So here is my problem. I am trying to have Router OS send me an email, which always ends up with Error sending e-mail <email-test>: timeout occurred
My email server is up and running and I have tried to send an email to myself from outside my network with success.
So I suppose that I have a problem with hairpin (which wouldn’t be so surprising). I have set up the following rules for hairpinning (all my rules, but only email-related seem to fail)
1 ;;; hairpin tcp interne
chain=srcnat action=masquerade protocol=tcp src-address=192.168.1.0/24 dst-address=192.168.1.xx out-interface-list=LAN log=no log-prefix=""
2 ;;; hairpin udp interne
chain=srcnat action=masquerade protocol=udp src-address=192.168.1.0/24 dst-address=192.168.1.xx out-interface-list=LAN log=no log-prefix=""
3 ;;; hairpin tcp 443
chain=dstnat action=dst-nat to-addresses=192.168.1.xx to-ports=443 protocol=tcp dst-address=<public IP> dst-port=443 log=no log-prefix=""
4 ;;; hairpin tcp 465
chain=dstnat action=dst-nat to-addresses=192.168.1.xx to-ports=465 protocol=tcp dst-address=<public IP> dst-port=465 log=no log-prefix=""
5 ;;; hairpin tcp 993
chain=dstnat action=dst-nat to-addresses=192.168.1.xx to-ports=993 protocol=tcp dst-address=<public IP> dst-port=993 log=no log-prefix=""
6 ;;; hairpin udp2
chain=dstnat action=dst-nat to-addresses=192.168.1.xx to-ports=49273-49393 protocol=udp dst-address=<public IP> dst-port=49273-49393 log=no log-prefix=""
7 ;;; hairpin udp1
chain=dstnat action=dst-nat to-addresses=192.168.1.xx to-ports=3478 protocol=udp dst-address=<public IP> dst-port=3478 log=no log-prefix=""
Do I do it correctly in general and what fails on email in particular (of course I have checked the ports I use) ?