Is it possible to help me understand how to achieve the following:
I want to access my PI from inside and outside my network using the FQDN which is an A record to my dynamic IP.
The first part I got working, I can access the PI over Vodacom, however, if I am on the local LAN and I enter the FQDN I cannot access it.
My gut says I need a hairpin NAT, my brain has no idea what that looks like in practice.
This is the port forward I did:
add action=dst-nat chain=dstnat comment="Raspberry Pi port forwarding" dst-port=80 in-interface=pppoe-out1 protocol=tcp to-addresses=192.168.88.3 to-ports=80
My current setup
Code:
/ip firewall filter
add action=accept chain=input comment="defconf: accept established,related,untracked" connection-state=established,related,untracked
add action=drop chain=input comment="defconf: drop invalid" connection-state=invalid
add action=accept chain=input comment="defconf: accept ICMP" protocol=icmp
add action=accept chain=input comment="defconf: accept to local loopback (for CAPsMAN)" dst-address=127.0.0.1
add action=drop chain=input comment="defconf: drop all not coming from LAN" in-interface-list=!LAN
add action=accept chain=forward comment="defconf: accept in ipsec policy" ipsec-policy=in,ipsec
add action=accept chain=forward comment="defconf: accept out ipsec policy" ipsec-policy=out,ipsec
add action=fasttrack-connection chain=forward comment="defconf: fasttrack" connection-state=established,related
add action=accept chain=forward comment="defconf: accept established,related, untracked" connection-state=established,related,untracked
add action=drop chain=forward comment="defconf: drop invalid" connection-state=invalid
add action=drop chain=forward comment="defconf: drop all from WAN not DSTNATed" connection-nat-state=!dstnat connection-state=new in-interface-list=WAN
/ip firewall nat
add action=masquerade chain=srcnat comment="NTP masq when ISP block 123" protocol=udp src-port=123 to-ports=12123-12153
add action=masquerade chain=srcnat comment="defconf: masquerade" ipsec-policy=out,none out-interface-list=WAN
add action=dst-nat chain=dstnat dst-address=!192.168.88.3 dst-port=53 protocol=udp src-address=!192.168.88.3 to-addresses=192.168.88.3
add action=dst-nat chain=dstnat dst-address=!192.168.88.3 dst-port=53 protocol=tcp src-address=!192.168.88.3 to-addresses=192.168.88.3
add action=masquerade chain=srcnat dst-address=192.168.88.3 dst-port=53 protocol=udp src-address=192.168.88.0/24
add action=masquerade chain=srcnat dst-address=192.168.88.3 dst-port=53 protocol=tcp src-address=192.168.88.0/24
add action=dst-nat chain=dstnat comment="Plex port forwarding" dst-port=32400 in-interface=pppoe-out1 protocol=tcp to-addresses=192.168.88.10 to-ports=32400
add action=dst-nat chain=dstnat comment="Raspberry Pi port forwarding" dst-port=80 in-interface=pppoe-out1 protocol=tcp to-addresses=192.168.88.3 to-ports=80
[thor@MikroTik] >