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

    Webgui Access Only by FQDN

    Scheduled Pinned Locked Moved webGUI
    9 Posts 5 Posters 1.5k 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.
    • vallumV
      vallum
      last edited by

      Hi Everyone,

      I have configured FQDN of my Pfsense to  firewall.example.com and i'm able to access it using https://firewall.example.com.

      But at the same time if i enter IP address like :- https://192.168.1.1  , login page is displayed . is there any way to either disable login WebGui through IP or make a permanent redirect rule from IP to NAME

      Manu

      1 Reply Last reply Reply Quote 0
      • NogBadTheBadN
        NogBadTheBad
        last edited by

        Nope.

        Basically you'd use the ip address regardless, the only difference between the two :-

        1. https://192.168.1.1/ < pc connect directly by IP address

        2. https://pfsense.example.com/ << pc looks up pfsense.example.com returns 192.168.1.1 web browser then connects to the returned IP address.

        At the network level they just use IP addresses to talk to each other.

        Andy

        1 x Netgate SG-4860 - 3 x Linksys LGS308P - 1 x Aruba InstantOn AP22

        1 Reply Last reply Reply Quote 0
        • GertjanG
          Gertjan
          last edited by

          @RootMd5:

          But at the same time if i enter IP address like :- https://192.168.1.1  , login page is displayed …..

          Strange.
          In my situation, I'm using https acces, using a cert from Letsencrypt, the "192.168.1.1" isn't part of the Certificate name, so my browser yells really hard, and doesn't want me to use this address as a address.
          Really friendly of course, because in the future, "192.168.1.1" will be dead anyway, and "2001:470:1f14:5c02:412::1" will rule and no one will type that one …
          All is well if I use "pfsense.myplace.locallan" - nice green lock icon, all happy. Behind the curtains, DNS will bring this "pfsense.myplace.locallan" back to 192.168.1.1 (no, not true : "2001:470:1f14:5c02:412::1", browsers llmove IPv6 because network connections don't know shit about URL's, but certainly certs do.

          No "help me" PM's please. Use the forum, the community will thank you.
          Edit : and where are the logs ??

          1 Reply Last reply Reply Quote 0
          • vallumV
            vallum
            last edited by

            @NogBadTheBad:

            Nope.

            Basically you'd use the ip address regardless, the only difference between the two :-

            1. https://192.168.1.1/ < pc connect directly by IP address

            Yeah , but once it is connected i want page to be redirected or reloaded as https://pfsense.example.com. i have configured this behavior in my Linux web-servers running with Apache

            1. https://pfsense.example.com/ << pc looks up pfsense.example.com returns 192.168.1.1 web browser then connects to the returned IP address.

            At the network level they just use IP addresses to talk to each other.

            Yes Right :)

            Manu

            1 Reply Last reply Reply Quote 0
            • vallumV
              vallum
              last edited by

              @Gertjan:

              @RootMd5:

              But at the same time if i enter IP address like :- https://192.168.1.1  , login page is displayed …..

              Strange.
              In my situation, I'm using https acces, using a cert from Letsencrypt, the "192.168.1.1" isn't part of the Certificate name, so my browser yells really hard, and doesn't want me to use this address as a address.
              Really friendly of course, because in the future, "192.168.1.1" will be dead anyway, and "2001:470:1f14:5c02:412::1" will rule and no one will type that one …
              All is well if I use "pfsense.myplace.locallan" - nice green lock icon, all happy. Behind the curtains, DNS will bring this "pfsense.myplace.locallan" back to 192.168.1.1 (no, not true : "2001:470:1f14:5c02:412::1", browsers llmove IPv6 because network connections don't know shit about URL's, but certainly certs do.

              Yes the warning showing security risk is very irritating ..
              Can you please share some documentation for using Lets-encrypt  , i only use my WebGui from LAN using self-signed certificate and added as trusted CA on my local machine and on WAN i have blocked everything.

              Manu

              1 Reply Last reply Reply Quote 0
              • DerelictD
                Derelict LAYER 8 Netgate
                last edited by

                Yeah , but once it is connected i want page to be redirected or reloaded as https://pfsense.example.com. i have configured this behavior in my Linux web-servers running with Apache

                Doesn't matter if there is a redirect. You will still get the certificate error when you initially connect because the certificate will not match the URL (IP address in this case.)

                If you don't like the certificate errors going to https://192.168.1.1/ then don't go to 192.168.1.1, go to the FQDN instead.

                Here, do this little experiment:

                https://172.217.5.196/

                Click through and see where you end up.

                Chattanooga, Tennessee, USA
                A comprehensive network diagram is worth 10,000 words and 15 conference calls.
                DO NOT set a source address/port in a port forward or firewall rule unless you KNOW you need it!
                Do Not Chat For Help! NO_WAN_EGRESS(TM)

                1 Reply Last reply Reply Quote 0
                • johnpozJ
                  johnpoz LAYER 8 Global Moderator
                  last edited by

                  If you don't want the error on your rfc1918 address you can also just add it as SAN using your own CA and issue the cert..  Then trust the CA.

                  Not having the webgui only respond via fqdn how you could do with a virtual domain on a httpd would be a mistake, since what if dns is not working..  It is the web gui of an appliance should always be available via the IP only.. be it http or https..

                  You can set httpd not to serve up document on the IP, but only on the fqdn but that could cause many issues with being able to access the gui without dns working.

                  If you don't like the IP then don't use the IP its that simple ;)

                  An intelligent man is sometimes forced to be drunk to spend time with his fools
                  If you get confused: Listen to the Music Play
                  Please don't Chat/PM me for help, unless mod related
                  SG-4860 24.11 | Lab VMs 2.8, 24.11

                  vallumV 1 Reply Last reply Reply Quote 0
                  • vallumV
                    vallum @johnpoz
                    last edited by

                    @johnpoz Thanks John, I see Green SSL now. i'm happy to use it with IP and FQDN both. :)

                    Manu

                    1 Reply Last reply Reply Quote 0
                    • vallumV
                      vallum
                      last edited by

                      @derelict said in Webgui Access Only by FQDN:

                      Yeah , but once it is connected i want page to be redirected or reloaded as https://pfsense.example.com. i have configured this behavior in my Linux web-servers running with Apache

                      Doesn't matter if there is a redirect. You will still get the certificate error when you initially connect because the certificate will not match the URL (IP address in this case.)

                      If you don't like the certificate errors going to https://192.168.1.1/ then don't go to 192.168.1.1, go to the FQDN instead.

                      Here, do this little experiment:

                      https://172.217.5.196/

                      Click through and see where you end up.

                      Thanks Derelict.
                      I have now added IP address in certificate and able to access Thanks for your Help.

                      Manu

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