I can access server from LAN by it’s IP (192.168.0.88:80), but for some reason i cant access it from internet (NMAP shows 80 port filtered).
Any help would be greatly appreciated.
************ not sure why you have this but I would do it this way.
add action=accept chain=input in-interface=LAN source-address-list=admin comment=“Allow admin to access router”
add action=drop chain=input comment=“Drop everything else on input side”
/ip firewall address list
add IP1 name=admin
add IP2 name=admin
or add subnet
or add a range
Finally you need dstnat rules… example
/ip nat
add action=dst-nat chain=dstnat comment='IDENTIFY EXTERNAL PURPOSE" dest-address=88.88.88.88 dst-port= 80 protocol=tcp to-addresses=192.168.0.88
@anav Thanks, seems like it’s working like a charm.
OS is 6.41, planned to update to latest bugfix release.
One question, server is not accessible when i’m trying to reach it from LAN with assigned public address 88.88.88.88. Is this behavior expected with 1-1 NAT or i messed up something else? :3
Edited: There are no issues at all when i’m trying to access it from different ISP, only from with scheme LAN PC → Web-server WAN address → NAT (WAN to LAN)-> Web-server LAN address.
Look for “hairpin NAT”. The client with address X.X.X.C (LAN) sends a request to 88.88.88.88, the request is dst-nated to server’s actual X.X.X.S (also LAN), but source address remains X.X.X.C. So the server responds to the request towards X.X.X.C, but since it is in the same subnet as its own X.X.X.S, it sends it directly rather than via Mikrotik, so the source address of the response remains X.X.X.S. The client ingores it because it expects a response from 88.88.88.88.
So add another src-nat rule, something like action=src-nat chain=forward src-address=X.X.X.0/mask dst-address=X.X.X.S protocol=tcp dst-port=80 to-addresses=X.X.X.1
Modify the blue parts as per your actual configuration, X.X.X.1 is Mikrotik’s own address in the LAN subnet.
No, because at the point on the packet path where the suggested rule is placed, the dst-address is already translated. This picture gives you all the details.