Netgate Discussion Forum
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Search
    • Register
    • Login

    NAT Port Forward on 80 redirects to 443 not working

    Scheduled Pinned Locked Moved NAT
    2 Posts 2 Posters 347 Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • B
      Bambos
      last edited by

      Hello Everyone, i have issue port forwarding to a device from a public IP to the remote IP of a device that is accessible through site to site OpenVPN. It seems that it uses 443 but needs to call 80 first, so forwarding to 443 is not working.

      The device that i'm visiting through site to site VPN is working normally. 192.168.27.201 (web interface)

      https://192.168.27.201 working
      http://192.168.27.201 working
      192.168.27.201:443 NOT Working
      192.168.27.201:80 working, and i can see the browser redirecting to 443.
      192.168.27.201 working, and i can see the browser redirecting to https://192.168.27.201

      With the pfSense VPN server i have tested the ports of the device using the LAN interface i made the site to site VPN : 80 is closed, 443 is open.

      00116b33-8365-4908-9221-7f23ad29f188-image.png

      Important Note: to remove any doubt for my setup, and focus on the fact that might be device issue, a nearby device 192.168.27.202 it has a succesful port forwarding from public IP using port 80 (web interface also).

      Strange or device issue ? Anyone faced something like that ?

      V 1 Reply Last reply Reply Quote 0
      • V
        viragomann @Bambos
        last edited by

        @bambos said in NAT Port Forward on 80 redirects to 443 not working:

        192.168.27.201:443 NOT Working
        192.168.27.201:80 working, and i can see the browser redirecting to 443.
        192.168.27.201 working, and i can see the browser redirecting to https://192.168.27.201

        These are not URLs! If you omit the http(s) (the scheme) the browser will add any itself to call the site. Which one might depend on the browser and his records with the destination.

        https basically goes alway to port 443 and http to port 80.

        Your forwarding is presumbably done by the web server. So this is a bit off-topic here.
        But if you want to see, what your web server replies on port 80, go to Diagnostics > Command Prompt in pfSense GUI and type

        curl -s -i http://192.168.27.201
        

        in the Execute Shell Command box. If it is redirected you should get code 301 or 302 and the new destination. If you get 200 there is no redirection.

        1 Reply Last reply Reply Quote 0
        • First post
          Last post
        Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.