I setup NAT as the following
Chain - DST-NAT
Protocol: tcp
dst.port : 80
in.interface: pppoe-out1 (This is my wan connection via ether1 which is connected to my modem)
action : dst-nat
To address: 172.28.20.254
To ports: 80
I tried to set it up DST-NAT as you said in your post but if I put in my LAN IP address as !172.28.8.0/24 in the src.address (This is my LAN) instead of using the in.interface as ive done it above. When I tried to navigate to say google from my network it would show my webserver intead of google.
Okay - change the above rule to this:
Protocol: tcp
dst.port : 80
dst-address: ! 172.28.0.0/16
dst-address-type=local
action : dst-nat
To address: 172.28.20.254
(To-ports: is not required if you're not modifying the port - in fact, you could also specify dst.port: 80,443 and also support SSL on your server)
That should fix it for you, as far as the problem you had where the entire world was being mapped to your internal server's web page.
dst-address-type=local means "any IP address configured on the Mikrotik itself" (this includes the dynamic wan IP and all LAN IPs at once)
dst-address: ! 172.28.0.0/16 -> exclude any of the LAN addresses of the Mikrotik from the above
Don't specify in-interface because requests from the LAN to the wan IP will not be arriving via the pppoe interface, thus wouldn't be matched.
Also note that if you request the DMZ server via its private IP, this will simply be forwarded and will work as you would normally expect it to.
in interface: ether6
out interface: pppoe-out1
action: accept
Can you also confirm that the way ive set all this up above in terms of firewalls/NAS is correct and secure? Just because I deviated slightly from how you said to set it up.
I would say that it's enough to just have one rule that says out interface: pppoe-out1
No need to specify the in-interface, as you want all of your LAN interfaces to be able to go out to the Internet anyway. This way it only takes one rule to allow both the LAN and the DMZ out to the world.
You were really close there, and good job on everything else you'd gotten working properly.