Quantcast
Channel: MikroTik
Viewing all articles
Browse latest Browse all 15394

Beginner Basics • Re: Home web address goes to router.

$
0
0
The Hairpin is used so that you can access the server from your local LAN using the public IP address or URL. To get port 80 to forward to the server you need a Destination NAT
Code:
add action=dst-nat chain=dstnat comment="Web Server on Jupiter." \    dst-port=80 in-interface=E10_Fiber_Internet protocol=tcp    to-addresses=192.168.201.11 to-ports=80add action=dst-nat chain=dstnat comment="Web Server on Jupiter." \    dst-port=443 in-interface=E10_Fiber_Internet protocol=tcp    to-addresses=192.168.201.11 to-ports=443
The first one forwards port 80 to my server (named Jupiter), and the other one forwards port 443 to Jupiter. Jupiter has an IP of 192.168.201.11. In my case I am specifying the in-interface as my fiber based Internet connection. I could have also used an interface list of WAN, but I wanted to restrict access to just the one ISP.

Statistics: Posted by k6ccc — Fri Jan 05, 2024 6:52 pm



Viewing all articles
Browse latest Browse all 15394

Trending Articles