thanks in advance for help, Iam for first time doing port forward.
I set port forward like everything that comes from internet to port 80 go to my local server to port 80 where I have IIS with aplication, and this works fine.
My problem is i can’t get the source ip when someone is connecting to my server and it always return address of LAN intefrace, not the source IP.
On log in my IIS source ip is allways LAN port of Mikrotic 10.6.1.201, its looks like this:
2021-07-14 11:53:50 10.6.0.85 GET /images/categories/5.jpg - 80 - 10.6.1.201 Mozilla/5.0+(Linux;…etc.
Where first addres is address of server and second addres is address of Mikrotik LAN intefrace
Is not possible, if are your RouterBOARD than NATranslate, you can see only the IP of the RouterBOARD.
For see also the IP, you must set one Public IP address on your server, and leave conect directly from out to your server.
Sourcenat is a funny being.
The typical source nat rule is
add action=masquerade chain=srcnat comment=“SCR_NAT FOR LAN USERS”
ipsec-policy=out,none out-interface-list=WAN
Which basically applies WANIP to all outgoing traffic from the LAN
I have two WAN interfaces and chose to handle each one separately for no good reason as the above rule would do the same thing.
add action=masquerade chain=srcnat comment=“SCR_NAT FOR LAN - FibreOP”
ipsec-policy=out,none out-interface=vlanbell
add action=masquerade chain=srcnat comment=“SCR_NAT for LAN - Cable”
ipsec-policy=out,none out-interface=Eastlink_eth7
The above situation describes the majority of situations, public IPs that are dynamic and applied to all internet outbound traffic.
IF ones public IP is static fixed, the above should work but more accurately is something like.
add action=src-nat chain=srcnat out-interface=fixed wan interface to-address=WANIP