I know that this port forwarding questions have been asked over and over again, but in 2 days I could not find the right answer nor managed to solve my issue. Here is the problem:
1. ether1 ( WAN ) has IP 192.168.0.20 and is connected to another router and goes to internet.
2. ether2 ( LAN ) has IP 192.168.1.1 and is connected to my PC that has IP 192.168.1.2
On my PC I am running web server with IP and port 192.168.1.2:8000. I need to access this web server from outside on port 81 like this 192.168.0.20:81 -> 192.168.2.2:8000.
All forwarding has been done as written in the wiki but is seems if the WAN port is different from the internal port the web server is not accessible. If I change the WAN port to be the same as the LAN, 8000, all works just fine and you can access the web server. I have no idea why and it seems I could not find any such problem that has been answered with a clear solution. Bellow is my full config and some other information. Any help is welcome because I kind of given up...
Code: Select all
# jul/14/2018 00:53:41 by RouterOS 6.42.6
#
# model = RouterBOARD 750G r3
/interface list
add name=WAN
add name=LAN
/interface wireless security-profiles
set [ find default=yes ] supplicant-identity=MikroTik
/interface list member
add interface=ether1 list=WAN
add interface=ether2 list=LAN
/ip address
add address=192.168.1.1/24 interface=ether2 network=192.168.1.0
add address=192.168.0.20/24 interface=ether1 network=192.168.0.0
/ip dns
set allow-remote-requests=yes servers=8.8.8.8
/ip firewall nat
add action=masquerade chain=srcnat
add action=dst-nat chain=dstnat dst-address=192.168.0.20 dst-port=81 log=yes protocol=tcp to-addresses=192.168.1.2 to-ports=8000
/ip route
add distance=1 gateway=192.168.0.1
/system routerboard settings
set silent-boot=no
And these entries in the log
Code: Select all
dstnat: in:ether1 out:(unknown 0), src-mac 30:07:4d:18:e1:4c, proto TCP (SYN), 192.168.0.208:39480->192.168.0.20:81, len 6
Koki