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

    Accessing localhost within the system redirecting to pfsense login page

    Scheduled Pinned Locked Moved General pfSense Questions
    12 Posts 3 Posters 4.1k 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.
    • V
      vasukolli
      last edited by

      Hello,

      I have installed pfsense in our company,I have an issue with this installation.When our developers accessing to localhost in their system ,its redirecting to pfsense login page.

      Can anyone please help in solving this issue.

      Thanks in advance.

      1 Reply Last reply Reply Quote 0
      • stephenw10S
        stephenw10 Netgate Administrator
        last edited by

        You mean the pfSense DNS forwarder is returning 192.168.1.1 for queries for 'localhost' rather than 127.0.0.1?

        Steve

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

          That seems quite odd, you sure your not doing a query for localhost.something?

          Clients should not even query for localhost to their dns since it should be in their local host file, or in new say windows systems it is handled via the local dns client

          see in the windows host file

          localhost name resolution is handled within DNS itself.

          127.0.0.1      localhost

          ::1            localhost

          And even if you did a query to pfsense for just localhost - it would return 127.0.0.1

          ; <<>> DiG 9.10-P2 <<>> localhost @192.168.1.253
          ;; global options: +cmd
          ;; Got answer:
          ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 19328
          ;; flags: qr aa rd ra ad; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 0

          ;; QUESTION SECTION:
          ;localhost.                    IN      A

          ;; ANSWER SECTION:
          localhost.              86400  IN      A      127.0.0.1

          ;; Query time: 4 msec
          ;; SERVER: 192.168.1.253#53(192.168.1.253)
          ;; WHEN: Tue Aug 19 10:34:49 Central Daylight Time 2014
          ;; MSG SIZE  rcvd: 43

          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.7.2, 24.11

          1 Reply Last reply Reply Quote 0
          • stephenw10S
            stephenw10 Netgate Administrator
            last edited by

            Reading this again, do you mean that developers are trying to access local servers and are getting the pfSense webgui? That's a much more likely result and there are several ways to avoid it:
            https://doc.pfsense.org/index.php/Why_can%27t_I_access_forwarded_ports_on_my_WAN_IP_from_my_LAN/OPTx_networks

            Steve

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

              This seems pretty clear that users are trying to access localhost on their system

              "When our developers accessing to localhost in their system ,its redirecting to pfsense login page."

              Which really seems impossible to me.

              So OP - please clarify when someone puts http://localhost/ in their browser they get the pfsense web gui??  And pfsense is not installed on their machines as say a VM or something?

              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.7.2, 24.11

              1 Reply Last reply Reply Quote 0
              • V
                vasukolli
                last edited by

                Thanks for reply,

                I have installed pfsense as a VM in ESXI server and assigned a  static ip of "192.168.2.23" .This ip is assigned by windows server 2012. When i type localhost or 127.0.0.1 in client system's browser its displaying pfsense admin login page.

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

                  Sorry but that just doesn't seem likely - pics please.

                  Please post the ipconfig /all of your client machine..  Sorry but going to 127.0.0.1 is not going to go across the network and connect to pfsense lan IP which you say is 192.168.2.23

                  Is your client also a vm on this esxi host?

                  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.7.2, 24.11

                  1 Reply Last reply Reply Quote 0
                  • V
                    vasukolli
                    last edited by

                    client is another computer in lan and its not a VM in ESXI server.

                    IPCONFIG Details:
                    Ethernet adapter Local Area Connection:

                    Connection-specific DNS Suffix  . : greenbuds.loc
                      Link-local IPv6 Address . . . . . : fe80::1455:287:cb08:6e8e%11
                      IPv4 Address. . . . . . . . . . . : 192.168.2.114
                      Subnet Mask . . . . . . . . . . . : 255.255.255.0
                      Default Gateway . . . . . . . . . : 192.168.2.1

                    Image1.PNG
                    Image1.PNG_thumb
                    Image2.PNG
                    Image2.PNG_thumb

                    1 Reply Last reply Reply Quote 0
                    • stephenw10S
                      stephenw10 Netgate Administrator
                      last edited by

                      Hmm, curious.
                      Yes, I think we're going to need more clarification here, a diagram perhaps. How is the test client connected to the VM host?
                      Your pfSense LAN is set to DHCP with the Win2k12 server assigning it? Is that also virtual?

                      Steve

                      1 Reply Last reply Reply Quote 0
                      • V
                        vasukolli
                        last edited by

                        Both pfsense and winserver are VM's in ESXI server. IP's for client computers are assigned by winserver and DHCP for pfsense lan interface is disabled. Proxy server configuration for client computer is configured through INTERNET OPTIONS in Windows 7.

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

                          "Proxy server configuration for client computer is configured through INTERNET OPTIONS in Windows 7"

                          And are you bypassing local connections for this proxy setting?  If not your asking your proxy for localhost, which I take it your proxy is pfsense?

                          proxybypasslocal.png
                          proxybypasslocal.png_thumb

                          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.7.2, 24.11

                          1 Reply Last reply Reply Quote 0
                          • V
                            vasukolli
                            last edited by

                            Hello,

                            Finally it solved with the help of your post.

                            Thanks for all of your excellent support.

                            -Vasu

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