I want to access a web server that is located in my lan from anywhere using a domain.
I set my router IP address in my domain name server an an A record, so any request to that domain is now sending to my router.
I have this NAT rules:
Code: Select all
/ip firewall nat
add action=masquerade chain=srcnat out-interface=pppoe-out1
add action=dst-nat chain=dstnat dst-port=8001 in-interface=pppoe-out1 protocol=tcp to-addresses=192.168.5.10 to-ports=8010
/ip service
set www disabled=yes
now I have 2 problems:
- It works fine, but if I change the dst-port to 80 (and I have to do so), it doesn't work and page don't load.
- If I remove in-interface all traffics to port 80 will forward to the server, and if let it still there, I can't access my web server using the domain in local lan
I'm using RB951 and RouterOS 6.42.3