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 NATThe 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.
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
Statistics: Posted by k6ccc — Fri Jan 05, 2024 6:52 pm